Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Solidity MetricsNew to Visual Studio Code? Get it now.
Solidity Metrics

Solidity Metrics

tintinweb

|
40,677 installs
| (3) | Free
Solidity Metrics
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

get in touch with Consensys Diligence
[ 🌐 📩 🔥 ]

VSCode Solidity Metrics

Generate Source Code Metrics, Complexity and Risk profile reports for projects written in solidity (Smart Contract Language).

vscode-solidity-metrics3

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.

src/Token.sol
src/governance/*.sol
./lib/utils/**/*.sol

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)

Credits

  • Sūrya
  • Github Markdown CSS
  • ShowdownJS
  • Chartjs
  • Alla Afanasenko (icon on logo composition)

Release Notes

see CHANGELOG


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft