Glossary

Cyclomatic Complexity

Cyclomatic Complexity is a metric that measures the complexity of a program by counting the number of different paths through the code.

Cyclomatic Complexity is a metric that measures the complexity of a program by counting the number of linearly independent paths through its source code. Thomas J. McCabe, Sr. developed the metric in 1976, based on the program's control flow.

We have a blog post that explains cyclomatic complexity and CRAP in detail.

Related Concepts: Cyclomatic complexity is often used alongside other code quality metrics and is a key factor in calculating CRAP (Change Risk Anti-Patterns). High complexity often contributes to technical debt and can indicate the presence of code smells.

Setting appropriate coverage thresholds and using status checks can help manage complexity in pull requests.

Ready when you are

Ship better code faster, with confidence.

PR comments, status checks, line annotations, and trends, all without code access. Free for public repos; per-repo pricing for private repos.