I am currently trying to run Checkstyle on a directory which contains a lot of files of various types and not only Java file.
java -Xmx1280m -jar checkstyle-5.5-all.jar -c my_config_checkstyle.xml -f xml -r c:/Exemple_Java
Unfortunatly the directory contains some big files (zip, exe) which seem to be taken in account by CheckStyle.
So above command ends with the following message:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Unknown Source) at java.lang.String.<init>(Unknown Source) at java.lang.StringBuilder.toString(Unknown Source) at com.puppycrawl.tools.checkstyle.api.FileText.<init>(FileText.java:146) at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:259) at com.puppycrawl.tools.checkstyle.Main.main(Main.java:121)
So my question is the following, how can I specified to checkStyle to only take in account java files and not all files contains in my root directory?
Note that in my_config_checkstyle.xml I have specified the property name="fileExtensions" everywhere. but the tool seems to continue loading all files.