If you use Checkstyle, especially as part of an automated build, you may notice that the size of the log file can be a bit big. I did, anyway, so I wrote a stylesheet to trim it down to size.
Checkstyle puts lots of entries into its log file; a minimum of 1 per file, possibly more. This can make the log file quite large; a typical log file for my current project is about 1/2 MB. This chews up disk space when you have several hundred archived logs, and it slows down processing of the log file.
The above stylesheet is easily integrated into your ant scripts, using the Ant style task, and generally makes life a lot nicer.
Comments (4)
Thanks Robert ! Will come in handy...
Posted by Michael | March 11, 2005 9:07 AM
Posted on March 11, 2005 09:07
hmm... so why you do you use checkstyle if you're not reducing the errors it find? :-) Also, if the errors are not getting fixed quickly maybe it's because they're not important and should be removed from the checkstyle config file?
Personally, I prefer to reduce the number of checkstyle checks done and make the one that we decide to keep fail the build. That way there's no need for HTML page generation and no log size issue! :-)
Posted by VincentMassol | March 12, 2005 9:24 PM
Posted on March 12, 2005 21:24
Vincent, I think you misunderstood the purpose of the filter. The filter removes the files that pass the checkstyle checks, leaving just the errors.
The main use I have for this is as part of my Cruisecontrol builds; I'm only interested in the errors in this scenario, so taking out the noise speeds up the log file processing a lot.
Posted by Robert | March 12, 2005 10:48 PM
Posted on March 12, 2005 22:48
Thanks Robert. Very handy indeed, especially if you work on a project with a lot of weird, but enforced (ie. will break the build), style rules.
Posted by Tom | March 14, 2005 6:13 PM
Posted on March 14, 2005 18:13