Awesome Reviewers

Verification · Static analysis

Complexity limits

Measures cyclomatic complexity, function length and nesting and fails when a change pushes a function past a limit.

Sub-techniques

  • Complexity thresholds V1012.001

    Per-function limits on cyclomatic or cognitive complexity.

  • Size budgets V1012.002

    Limits on function, file and parameter counts.

How to build it

  1. Measure the current distribution and set the limit at the existing worst case.
  2. Lower it over time; never block on files the change did not touch.
  3. Prefer a linter rule (ruff C901, ESLint complexity) over a separate tool.

Signals in a repository

  • max-complexity or complexity rules in linter config.
  • radon or lizard reports in CI.