Inspectopedia
 
2024.3

Overly complex method

Warning
New
Last modified: 03 December 2024

Reports methods that have too many branch points.

A branch point is one of the following:

  • loop statement

  • if statement

  • ternary expression

  • catch section

  • expression with one or more && or || operators inside

  • switch block with non-default branches

Methods with too high cyclomatic complexity may be confusing and hard to test.

Use the Method complexity limit field to specify the maximum allowed cyclomatic complexity for a method.