CWE-1121

Excessive McCabe Cyclomatic Complexity. [Complexity-Issues, Improper-Adherence-To-Coding-Standards]

Required inputs: IR

The code contains McCabe cyclomatic complexity that exceeds a desirable maximum.

This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.

Excerpts from CWE [https://cwe.mitre.org], Copyright (C) 2006-2026, the MITRE Corporation. See section 9.4. "3rd-Party Licenses" in the documentation for full details.

Possible Messages

Key

Text

Severity

Disabled

cyclomatic_complexity_with_value

Cyclomatic complexity of {} exceeds limit of {}.

None

False

excessive_cyclomatic_complexity

Cyclomatic complexity exceeds limit of {}.

None

False

Options

maxcomplexity

maxcomplexity : int = 15

Maximum acceptable cyclomatic complexity.
 

show_value

show_value : bool = False

Whether metric value should be displayed.