[tor-commits] [exonerator/master] Make checkstyle task fail, when new warnings appear.

karsten at torproject.org karsten at torproject.org
Tue Aug 2 18:09:25 UTC 2016


commit 7c1c6b75240daf5b7c4b64a469c7cda5f6bc3cd4
Author: iwakeh <iwakeh at torproject.org>
Date:   Tue Aug 2 17:09:41 2016 +0200

    Make checkstyle task fail, when new warnings appear.
---
 build.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/build.xml b/build.xml
index b8e77c8..dfb7c2e 100644
--- a/build.xml
+++ b/build.xml
@@ -74,6 +74,17 @@
       <formatter type="plain"
                  toFile="${generated}/checkstyle_report.txt"/>
     </checkstyle>
+    <exec executable="cat" outputproperty="checkstyle.result">
+      <arg value="${generated}/checkstyle_report.txt" />
+    </exec>
+    <fail message="Checkstyle complaints: ${checkstyle.result}" >
+      <condition>
+        <not>
+          <length string="${checkstyle.result}"
+                  length="29" />
+        </not>
+      </condition>
+    </fail>
   </target>
 
   <!-- Create a .war file for deployment. -->



More information about the tor-commits mailing list