Inspectopedia Help

Overly complex method

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.

Inspection options

Option

Type

Default

Method complexity limit

Number

10

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023