cccc-cli 1.7.0

The unified cccc binary: one CLI that measures cognitive/cyclomatic complexity across every bundled language (ECMAScript/TypeScript, Rust, Go, PHP, Ruby, Python, Perl, Zig, C, C++, Swift, Java, Dart, Scala)
Documentation

The unified cccc CLI.

One binary measures Cognitive Complexity and Cyclomatic Complexity across every bundled language. A file is routed to the right front-end by its extension (see [lang]), so a single run can analyze a mixed-language tree. Recurring options can be baked into a cccc.toml config file (see [config]); CLI flags always take precedence over it.

Everything common to the languages lives here: argument parsing, config resolution, file discovery, the results cache (see [cache]), parallel analysis, the threshold/--min/--top logic, and output rendering. Each language supplies only how to analyze one file and its default extensions, via the [lang::LANGUAGES] registry.

Exit codes

[run] returns a process exit code with a consistent meaning:

  • 0 — success (including an existing input path that simply contains no matching files: "nothing to analyze" is not an error).
  • 1 — a --max-cognitive/--max-cyclomatic threshold was exceeded (the CI gate).
  • 2 — unable to proceed: a given path does not exist, a config/--lang value was invalid, or the worker pool could not be created. (clap's own usage errors also exit 2.)