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.
| Fields inherited from class | Fields |
|---|---|
class AbstractAstVisitorRule |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME |
| Type | Name and description |
|---|---|
java.lang.Class |
astVisitorClass |
java.lang.String |
ignoreRegex |
int |
maxNestedBlockDepth |
java.lang.String |
name |
int |
priority |