Cyclomatic complexity (Lizard)
Software QualityInformativeHugo ter Doest's proposal
What it checks
The average and maximum cyclomatic complexity of the functions, measured with Lizard.
Why it matters
Functions with many paths are hard to understand and to test.
Where it comes from
Hugo ter Doest's proposal. Hugo ter Doest's proposal for the Component Checker sets what a repository must contain: a licence, publiccode.yml, documentation, tests, Docker, Helm, OpenAPI and the other basics.
Also follows from: SIG ratings as Common Ground uses them.
Standard for Public Code. No criterion of the Standard for Public Code matches this one.
Level and version
- Level
- Informative
- Counts in the rating
- No, it is shown but never counted
- Checklist version
- Introduced in 2026.1
- Category
- Software Quality
- Aspect
- None: the criterion does not feed an aspect
How it is measured
Measured with lizard.
Tools and models says what each tool proves and what it does not.
How to pass
- Split complex functions into smaller ones.
- Keep the average complexity at 15 or less and the highest at 30 or less. An administrator can change these limits.