Groovy
If statement with too many branches
Warning
Code Style
New
Last modified: 03 December 2024 Reports if
statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction.
Example:
if (a) {
print "foo"
} else if (b) {
print "bar"
} else if (c) {
print "baz"
} else if (d) {
print "Too many branches"
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
GroovyIfStatementWithTooManyBranches
Use the Maximum number of branches field to specify the maximum number of branches expected.
Here you can find the description of settings available for the If statement with too many branches inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Groovy, 243.23126 |
Thanks for your feedback!
Was this page helpful?