|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codenarc.rule.AbstractAstVisitorRule
groovy.org.codenarc.rule.size.NestedBlockDepthRule
class NestedBlockDepthRule extends AbstractAstVisitorRule
Rule that checks for blocks or closures nested more than a configured maximum number. Blocks include if, for, while, switch, try, catch, finally and synchronized blocks/statements, as well as closures.
ThemaxNestedBlockDepth
property holds the threshold value for the maximum number of
nesting levels. A block or closures nested deeper than that number of levels is considered a
violation. The maxNestedBlockDepth
property defaults to 3.
Property Summary | |
---|---|
Class |
astVisitorClass
|
String |
ignoreRegex
|
int |
maxNestedBlockDepth
|
String |
name
|
int |
priority
|
Property Detail |
---|
Class astVisitorClass
String ignoreRegex
int maxNestedBlockDepth
String name
int priority
Groovy Documentation