You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/08/03 10:14:16 UTC

[GitHub] vvysotskyi commented on a change in pull request #1415: DRILL-6656: Disallow extra semicolons in import statements.

vvysotskyi commented on a change in pull request #1415: DRILL-6656: Disallow extra semicolons in import statements.
URL: https://github.com/apache/drill/pull/1415#discussion_r207495118
 
 

 ##########
 File path: src/main/resources/checkstyle-config.xml
 ##########
 @@ -35,11 +35,26 @@
 
     <module name="AvoidStarImport"/>
     <module name="NeedBraces"/>
+    <module name="EmptyStatement"/>
 
   </module>
 
   <module name="FileTabCharacter"/>
 
+  <!--
+    Due to a bug in openjdk 7 and 8, extra semicolons in import statements are allowed. However, these extra semicolons can cause compilation failures with other java
+    distributions since they are technically disallowed by the java spec. These two regexes prevent extra semicolons in import statements. As an extra side-effect they also
+    disallow certain usages of semicolons elsewhere in the body of a java file. But we are okay with disallowing strange placement of semicolons in those other cases.
+  -->
+  <module name="RegexpSingleline">
 
 Review comment:
   Could you please consider using existing checks, since looks like a partial case for this pattern: `code;;` is handled by already added `EmptyStatement` check and more general case: `r = 5; int t;` may be handled by [OneStatementPerLine](http://checkstyle.sourceforge.net/config_coding.html#OneStatementPerLine) check.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services