[tor-commits] [metrics-base/master] Fix Checkstyle check for do-while statements.

karsten at torproject.org karsten at torproject.org
Wed Jul 24 17:00:56 UTC 2019


commit 42ee1fc086b0e86cddf56475124a547465484321
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Wed Jul 24 19:00:35 2019 +0200

    Fix Checkstyle check for do-while statements.
---
 java/metrics_checks.xml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/java/metrics_checks.xml b/java/metrics_checks.xml
index 858d4ea..cefde39 100644
--- a/java/metrics_checks.xml
+++ b/java/metrics_checks.xml
@@ -20,6 +20,9 @@
 
      - Limit line length to 80 [LineLength].
 
+     - Require the "while" of a do-while statement to start on the same
+       line as the closing brace of the "do" [RightCurly].
+
     Checkstyle is very configurable. Be sure to read the documentation at
     http://checkstyle.sf.net (or in your downloaded distribution).
 
@@ -70,7 +73,11 @@
         <module name="RightCurly"/>
         <module name="RightCurly">
             <property name="option" value="alone"/>
-            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
+            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
+        </module>
+        <module name="RightCurly">
+            <property name="option" value="same"/>
+            <property name="tokens" value="LITERAL_DO"/>
         </module>
         <module name="WhitespaceAround">
             <property name="allowEmptyConstructors" value="true"/>



More information about the tor-commits mailing list