codeinspector
1.0.0
Codeinspector是用於在Wolfram語言代碼中查找和報告問題的軟件包。 CodeinSpector有大量的規則,可用於檢查Wolfram語言源代碼文件,並可以根據您的偏好進行自定義。
在獨立的內核中:
Needs["CodeInspector`"]
CodeInspectSummarize["If[a,b,b]"]
Out[2]= If[a,b,b]
line 1: If[a,b,b]
^ ^
DuplicateClauses Error Both branches are the same.
在前端: 
Wolfram語言中的靜態分析工具
community.wolfram.com上的“ Codeparser and Codeinspector”
從WTC 2019中的Wolfram語言查找錯誤:觀看視頻(YouTube)
從WTC 2019中的Wolfram語言查找錯誤:觀看視頻(Wolfram.com)
WTC 2019中的Wolfram語言查找錯誤:下載演示文稿
Codeinspector取決於Codeparser Paclet和CodeFormatter Paclet。
Codeinspector及其依賴項包含在Mathematica 12.2及以上。
對於較舊的版本,請從公共Paclet Server安裝Codeinspector Paclet和依賴項:
PacletInstall["CodeParser"]
PacletInstall["CodeFormatter"]
PacletInstall["CodeInspector"]
在本地建立和安裝Codeinspector Paclet
安裝CodeParser和CodeinSpector後,可以使用CodeinSpector。
返回一串代碼中發現的所有問題的列表:
Needs["CodeInspector`"]
CodeInspect["If[a,b,b]"]
Out[2]= {DuplicateClauses Error Both branches are the same.}
總結源代碼文件中發現的問題:

CodeInspect和CodeInspectSummarize的輸入可能是字符串, File或字節列表。
在Wolfram系統中查看本教程幫助瀏覽器:
確保可以在系統上找到Paclets:
Needs["CodeInspector`"]
並嘗試一個基本示例:
CodeInspect["If[a, b, b]"]