Don't know whether you're using command line or in an IDE, but you'll basically need a suppresions file. If you're manually editing the Checkstyle config file, add a new module to it:
<module name="SuppressionFilter">
<property name="file" value="mysuppressions.xml" />
</module>
Your mysuppression.xml
can be something like:
<?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 for "files
" attribute is basically a regex for your source files, and the value for the "checks
" attribute is regex for what checks to skip ("[a-zA-Z0-9]*
" basically means skip everything). This is the pattern you're looking for I guess?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…