You can run it on the command line as follows:
java -jar checkstyle-5.5-all.jar -c docs/sun_checks.xml -r /path/to/src
If you use bash, you can enable globstar and then only process java files as follows:
shopt -s globstar java -jar checkstyle-5.5-all.jar -c docs/sun_checks.xml -r /path/to/src/**/*.java
Checkstyle command line documentation is here .
Update: Use Suppression Filter
Create a bans file that should ignore all class file checks. You can add regular expressions for other types of files that you are not interested in either.
suppressions.xml:
<suppressions> <suppress checks="." files=".*\.class"/> </suppressions>
Add a confirmation filter to the verification file:
my_checks.xml:
<module name="SuppressionFilter"> <property name="file" value="suppressions.xml"/> </module>
Run it:
java -jar checkstyle-5.5-all.jar -c my_checks.xml -r /path/to/src
Suppression filter documentation can be found here .
dogbane
source share