metrics

$qlty metrics [OPTIONS] [PATHS]

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

One or more paths to scan for code smells.
Compute metrics for all files, not just changed

Output directory-level metrics. Conflicts with --functions.

Output function-level metrics. Conflicts with --dirs.

Print directory-level metrics up to a depth from the current directory.

Sort results by a metric
Maximim rows to print. Works well with --sort.
Exclude tests
Upstream base ref to compare against
Only show results

Examples

Summarize metrics across directories
$qlty metrics --all --max-depth 2
Review the 10 most complex files
$qlty metrics --all --sort complexity --limit 10
View function-level metrics for a file
$qlty metrics --functions remix/app/root.tsx

See Also