metrics
Compute code quality metrics
Calculate metrics like classes count, complexity, lines of code, and cohesion for supported languages using our custom built static analysis.
Arguments
[PATHS]...
Files to analyze
-a, --all
Compute metrics for all files, not just changed
-d, --dirs
Print per-directory stats
--functions
Print function stats
--max-depth <MAX_DEPTH>
Directory depth to print, this flag will also set to print per-directory stats
--sort
Sort output by column [possible values: name, classes, functions, fields, lines, loc, complexity, lcom]
--limit
Maximum rows to print
--exclude-tests
Exclude tests
--upstream
Upstream base ref to compare against
--quiet
Only show results
Examples
Summarize metrics across directories
Review the 10 most complex files
View function-level metrics for a file