//CHECKSTYLE:OFF
i++;
//CHECKSTYLE:ON
In checkstyle.xml
:
<module name="SuppressionFilter">
<property name="file" value="suppressions.xml"/>
</module>
In suppresions.xml
:
<!-- DON'T FORGET TO UPDATE checkstyle.xml!!! -->
<suppressions>
<suppress files="foo\.java" checks=".*"/>
<suppress files="bar\.java" checks=".*"/>
<!-- ignore all files in generated directory -->
<suppress files="/generated/" checks=".*"/>
</suppressions>
http://stackoverflow.com/questions/1012407/how-to-suppress-all-checks-for-a-file-in-checkstyle