Problem Description
IntelliJ IDEA Java when loading the file checkstyle, along the following error
com.puppycrawl.tools.checkstyle.api.CheckstyleException:
cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of LineLength
Please review 'Parent Module' section for this Check in web documentation if Check is standard.
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:473)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198)
at org.infernus.idea.checkstyle.service.cmd.OpCreateChecker.execute(OpCreateChecker.java:61)
at org.infernus.idea.checkstyle.service.cmd.OpCreateChecker.execute(OpCreateChecker.java:26)
at org.infernus.idea.checkstyle.service.CheckstyleActionsImpl.executeCommand(CheckstyleActionsImpl.java:130)
at org.infernus.idea.checkstyle.service.CheckstyleActionsImpl.createChecker(CheckstyleActionsImpl.java:60)
at org.infernus.idea.checkstyle.service.CheckstyleActionsImpl.createChecker(CheckstyleActionsImpl.java:51)
at org.infernus.idea.checkstyle.checker.CheckerFactoryWorker.run(CheckerFactoryWorker.java:46)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: TreeWalker is not allowed as a parent of LineLength Please review 'Parent Module' section for this Check in web documentation if Check is standard.
at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:147)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:468)
... 7 more
Triggered
Through access to information that the cause of the problem is that the situation is not compatible with the version of the update causes appear checkstyle
Solution
-
Open the xml file to be loaded
as shown, I am here is to open with the vscode
-
According to the contents of the error, find out the error of module
I copied directly to the error to a file for easy viewing
later Read on to discover problems occur in roughly TreeWalker not have LineLength module
pondered first try commenting out smaller LineLength module
save, and try to load it again
success!
postscript
Whether commented out will affect the use of content is still unknown, if the problem in the future will continue to add