C#-MaxComplexity

Functions must not exceed cyclomatic complexity limit

Required inputs: CSharpAST

Complex control flow can make code hard to understand. Try splitting up the code into multiple functions that can be understood individually.
Note
Cyclomatic complexity is also available as a metric, which can be configured to produce a metric violation when limits are exceeded. This stylecheck rule is available as an alternative to the metric.

Possible Messages

Key

Text

Severity

Disabled

cyclomatic_complexity_with_value

Cyclomatic complexity of {1} exceeds limit of {0}.

None

False

excessive_cyclomatic_complexity

Cyclomatic complexity exceeds limit of {0}.

None

False

Options

maxcomplexity

maxcomplexity : int = 15

Maximum acceptable cyclomatic complexity.
 

show_value

show_value : bool = False

Whether metric value should be displayed.