https://issues.apache.org/bugzilla/show_bug.cgi?id=50743

           Summary: Cache results to speed up Checkstyle #build
           Product: Tomcat 7
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Packaging
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: oli...@puppycrawl.com


Created an attachment (id=26627)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26627)
Patch to enable caching

Checkstyle supports caching files that have successfully passed with no errors,
so that these files are not processed again on subsequent invocations of
Checkstyle until the files are modified again. As the output below shows, this
speeds up the Checkstyle from 51 seconds to 15 seconds.

The attached patch, based on trunk, adds support for caching Checkstyle
results. The cache files are stored in the ${tomcat.output} directory, so are
removed whenever an "ant clean" is performed.

You could get more sophisticated and store the cache files outside of the
${tomcat.output} directory to save history across "ant clean" invocations. In
this case, you then need to make the build logic smarter to invalidate the
cache files if any of the Checkstyle configuration files change. Let me know if
you are interested in a patch to do this.

=======================================================
oliver@oliver-laptop tomcat-trunk]$ ant -q validate
     [echo] Testing  for /tmp/tomcat/checkstyle-5.1/checkstyle-all-5.1.jar
[checkstyle]
/home/oliver/play/tomcat-trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java:21:8:
Unused import - org.apache.catalina.tribes.ErrorHandler.

BUILD FAILED
/home/oliver/play/tomcat-trunk/build.xml:430: Got 1 errors and 0 warnings.

Total time: 55 seconds
[oliver@oliver-laptop tomcat-trunk]$ ant -q validate
     [echo] Testing  for /tmp/tomcat/checkstyle-5.1/checkstyle-all-5.1.jar
[checkstyle]
/home/oliver/play/tomcat-trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java:21:8:
Unused import - org.apache.catalina.tribes.ErrorHandler.

BUILD FAILED
/home/oliver/play/tomcat-trunk/build.xml:430: Got 1 errors and 0 warnings.

Total time: 15 seconds

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to