I don't know if you use the command line or in the IDE, but basically you need a suppresions file. If you manually edit the Checkstyle configuration file, add a new module to it:
<module name="SuppressionFilter"> <property name="file" value="mysuppressions.xml" /> </module>
Your mysuppression.xml might look something like this:
<?xml version="1.0"?> <!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> <suppressions> <suppress files="TheClassToIgnore\.java" checks="[a-zA-Z0-9]*"/> </suppressions>
The value of the " files " attribute is basically a regular expression for your source files, and the value for the " checks " attribute is a regular expression for which checks to skip (" [a-zA-Z0-9]* " basically means skip all), This is the sample you're looking for, I think?
aberrant80 Jun 19 '09 at 6:11 2009-06-19 06:11
source share