To me it concern Continuous Integration : an article by Jay Fields (ThoughtWorks) about including tests in the build process : What’s in your build ?.
And as Lars Trieloff (Software Documentation Weblog) points out there is a comment worth reading !
About using CheckStyle :
I found this gem:
number.substring(0, Integer.parseInt (“3”)). Why?
Checkstyle was set up to report magic numbers > 2.
The developer in question (a lead !) wanted his code to look clean.