Fix FallThrough check violation in code, issue #945
This commit is contained in:
parent
a2b8be14bb
commit
a0acabc125
|
|
@ -243,6 +243,7 @@
|
|||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
</module>
|
||||
<module name="FallThrough"/>
|
||||
|
||||
<!--
|
||||
<module name="AbbreviationAsWordInName"/>
|
||||
|
|
@ -257,7 +258,6 @@
|
|||
<module name="EmptyForInitializerPad"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="ExecutableStatementCount"/>
|
||||
<module name="FallThrough"/>
|
||||
<module name="FinalParameters"/>
|
||||
<module name="HiddenField"/>
|
||||
<module name="IllegalToken"/>
|
||||
|
|
|
|||
|
|
@ -263,9 +263,13 @@ public class EmptyLineSeparatorCheck extends Check
|
|||
if (ast.getLineNo() > 1 && !hasEmptyLineBefore(ast)) {
|
||||
log(ast.getLineNo(), MSG_SHOULD_BE_SEPARATED, ast.getText());
|
||||
}
|
||||
if (!hasEmptyLineAfter(ast)) {
|
||||
log(nextToken.getLineNo(), MSG_SHOULD_BE_SEPARATED, nextToken.getText());
|
||||
}
|
||||
if (hasNotAllowedTwoEmptyLinesBefore(ast)) {
|
||||
log(ast.getLineNo(), MSG_MULTIPLE_LINES, ast.getText());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (nextToken.getType() != TokenTypes.RCURLY && !hasEmptyLineAfter(ast)) {
|
||||
log(nextToken.getLineNo(), MSG_SHOULD_BE_SEPARATED, nextToken.getText());
|
||||
|
|
|
|||
Loading…
Reference in New Issue