Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50743
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 18 Feb 2011 16:53:08 +0000 (16:53 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 18 Feb 2011 16:53:08 +0000 (16:53 +0000)
Cache CheckStyle results between builds to speed up validation. Patch provided by Oliver.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1072057 13f79535-47bb-0310-9956-ffa450edef68

build.xml
res/checkstyle/checkstyle.xml
res/checkstyle/javax-checkstyle.xml
res/checkstyle/org-checkstyle.xml
webapps/docs/changelog.xml

index 5fb8926..a6dd304 100644 (file)
--- a/build.xml
+++ b/build.xml
   </target>
 
   <target name="validate" depends="download-validate" if="${execute.validate}">
+    <!-- Required so we can cache checkstyle results -->
+    <mkdir dir="${tomcat.output}/res/checkstyle"/>
+
     <taskdef resource="checkstyletask.properties"
              classpath="${checkstyle.jar}" />
     <checkstyle config="res/checkstyle/checkstyle.xml">
index b9a23b1..bd9be52 100644 (file)
   <module name="FileTabCharacter"/>
 
   <module name="TreeWalker">
+    <!-- Cache what has passed checkstyle -->
+    <property name="cacheFile"
+              value="${tomcat.output}/res/checkstyle/cachefile-checkstyle.xml"/>
+
     <!-- Block Checks -->
     <!--  ~60 errors
     <module name="AvoidNestedBlocks"/>
@@ -77,4 +81,4 @@
     </module>
     -->
   </module>
-</module>
\ No newline at end of file
+</module>
index 46675f8..2197c6a 100644 (file)
   <!-- Specific checks for javax.* packages -->
 
   <module name="TreeWalker">
+    <!-- Cache what has passed checkstyle -->
+    <property name="cacheFile"
+              value="${tomcat.output}/res/checkstyle/cachefile-javax-checkstyle.xml"/>
+
     <module name="ImportControl">
       <property name="file" value="${basedir}/res/checkstyle/javax-import-control.xml"/>
     </module>
   </module>
-</module>
\ No newline at end of file
+</module>
index bd37002..69ee676 100644 (file)
   <!-- Specific checks for javax.* packages -->
 
   <module name="TreeWalker">
+    <!-- Cache what has passed checkstyle -->
+    <property name="cacheFile"
+              value="${tomcat.output}/res/checkstyle/cachefile-org-checkstyle.xml"/>
+
     <module name="ImportControl">
       <property name="file" value="${basedir}/res/checkstyle/org-import-control.xml"/>
     </module>
   </module>
-</module>
\ No newline at end of file
+</module>
index 6ffb8ef..66c4945 100644 (file)
       </fix>  
     </changelog>
   </subsection>
+  <subsection name="Other">
+    <changelog>
+      <fix>
+        <bug>50743</bug>: Cache CheckStyle results between builds to speed up
+        validation. Patch provided by Oliver. (markt)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 7.0.8 (markt)" rtext="released 2011-02-05">
   <subsection name="Catalina">