Checks the location of the opening brace ({) for if statements and optionally closing and opening braces for else statements. By default, requires them on the same line, but the sameLine property can be set to false to override this. To enable else checking, set the validateElse property to true. For more fine grained control, use boolean properties elseOnSameLineAsClosingBrace and elseOnSameLineAsOpeningBrace Example:
if (x) { //A } else if (y) { //B } else { //C }A - checked and defaults to no errors since the brace is on the same line
Type | Name and description |
---|---|
Class |
astVisitorClass |
Boolean |
elseOnSameLineAsClosingBrace |
Boolean |
elseOnSameLineAsOpeningBrace |
String |
name |
int |
priority |
boolean |
sameLine |
boolean |
validateElse |