Awesome Reviewers checks + prompts

Complexity limits

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

V1012 technique
tactic Static analysis
not detectable from CI configuration

Sub-techniques

2

IDNameDescription
V1012.001Complexity thresholdsPer-function limits on cyclomatic or cognitive complexity.
V1012.002Size budgetsLimits on function, file and parameter counts.

Craft 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.

Reverse engineer it

Signs that a codebase already runs this technique, and where to read how it is configured.

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

Open-source packages

3