Uses ESComplex to produce a complexity analysis report for a JavaScript project or file. The following metrics can calculated:
- Lines of code
- Number of parameters
- Cyclomatic complexity
- Halstead metrics
- Maintainability
- Install the latest Visual Studio Code.
- In the command palette (
Ctrl-Shift-P
orCmd-Shift-P
orF1
) selectInstall Extension
and chooseJS Complexity Analysis Report
.
Produces a per function complexity analysis report of all .js
files in the project. node_modules
folder is always ignored. Open command palette F1
and search for Project complexity analysis
.
By default project's search.exclude
configuration is used for excluding files, but included files can be configured using include and exclude glob patterns. Select Code
--> Preferences
--> User Settings
or Workspace Settings
. For example:
"complexityAnalysis.exclude": {
"**/bower_components/**": true
},
"complexityAnalysis.include": {
"**/app/**": true
}
Produces a per function complexity analysis report of currently open file. Open command palette F1
and search for File complexity analysis
.
Report them here.
This project is a grateful recipient of the Futurice Open Source sponsorship program. ♥