Awesome Reviewers

Verification · Static analysis · Complexity limits

Complexity thresholds

Per-function limits on cyclomatic or cognitive complexity.

How to build it

  1. Measure cyclomatic complexity of every function and record the current maximum.
  2. Set the limit at that maximum and fail only when a changed function exceeds it.
  3. Lower the limit in steps as functions are refactored.

Signals in a repository

  • A radon or lizard command in CI with a threshold argument.
  • A max-complexity setting or a complexity rule in the linter config.
  • A baseline file listing the functions that are above the limit.

In practice

No scanned repository runs a tool for this check. The steps above are the only guidance.