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
B - checked if option validateElse is set to true. Validation result controlled by boolean
options elseOnSameLineAsClosingBrace and elseOnSameLineAsOpeningBrace
C - same as B
- Authors:
- Hamlet D'Arcy
- Geli Crick
- Matias Bjarland