Documentation · Static metrics

km cycom

Cyclomatic complexity

Computes cyclomatic complexity per file and per function by counting decision points (if, for, while, match, &&, ||, etc.).

km cycom [path]

Options:

FlagDescription
--format {table,json,short,terse,github,codeclimate}Output format (default: table). github emits GitHub Actions annotations; codeclimate (alias: gitlab) emits CodeClimate JSON for GitLab Code Quality
--include-testsInclude test files in analysis (excluded by default)
--top NShow only the top N files (default: 20)
--min-complexity NSkip files whose most complex function is below N; with --per-function, also hide functions below N (default: 1)
--per-functionShow per-function breakdown