Generate Source Code Metrics, Complexity and Risk profile reports for projects written in solidity (Smart Contract Language).
Usage
Explorer: right-click one or more .sol files or folders → Solidity: Metrics.
Command palette (cmd + shift + p):
Solidity Metrics: Report metrics for all open workspaces
Solidity Metrics: Report metrics for current file
Solidity Metrics: Analyze Solidity Using Scope File
The report can be exported from the editors title context menu or by executing cmd + shift + p → Solidity Metrics: Export This Metrics Report.
Scope file
A scope file lists one file or glob per line, relative to the workspace folder. Blank lines are ignored, and a leading ./ and Windows \ separators are accepted.
Right-click a file named scope.txt (setting solidity-metrics.scopefile.name) → Solidity: Metrics, or run Solidity Metrics: Analyze Solidity Using Scope File and enter its path relative to the workspace folder.
Settings
solidity-metrics.file.exclusions.glob: paths to leave out of the analysis (default {**/node_modules,**/mock*,**/test*,**/migrations,**/Migrations.sol})
solidity-metrics.file.limit: maximum number of files to analyze (default 2000)
solidity-metrics.scopefile.name: scope file name the explorer context menu recognizes, and the default path for Analyze Solidity Using Scope File (default scope.txt)