I get the following error when I try to load a user defined check style template.
cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of FileLength
I think it might be due to the incompatibilty with checkstyle version in my eclipse. How will I be able to find the appropriate checkstyle version with checkstyle xml file
This is an error in the template, independent of the Checkstyle version. FileLength goes directly under Checker, not under TreeWalker.
Example:
<module name="Checker"> <property name="severity" value="warning"/> <module name="TreeWalker"> <property name="tabWidth" value="4"/> <module name="JavadocType"/> <!-- many others --> </module> <module name="NewlineAtEndOfFile"/> <module name="FileLength"/> <module name="JavadocPackage"/> <!-- others --> </module>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With