An exception occurs with a configuration file that worked properly in previous versions (i dont know which).
Tested with eclipse-cs contained in net.sf.eclipsecs_5.3.0.201012121300-updatesite-.zip
Stack trace is:
cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of RegexpHeader
net.sf.eclipsecs.core.util.CheckstylePluginException: cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of RegexpHeader
at net.sf.eclipsecs.core.util.CheckstylePluginException.rethrow(CheckstylePluginException.java:66)
at net.sf.eclipsecs.core.util.CheckstylePluginException.rethrow(CheckstylePluginException.java:77)
at net.sf.eclipsecs.core.builder.Auditor.runAudit(Auditor.java:164)
at net.sf.eclipsecs.core.builder.CheckstyleBuilder.handleBuildSelection(CheckstyleBuilder.java:287)
at net.sf.eclipsecs.core.jobs.RunCheckstyleOnFilesJob.runInWorkspace(RunCheckstyleOnFilesJob.java:96)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of RegexpHeader
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at net.sf.eclipsecs.core.builder.CheckerFactory.createCheckerInternal(CheckerFactory.java:320)
at net.sf.eclipsecs.core.builder.CheckerFactory.createChecker(CheckerFactory.java:143)
at net.sf.eclipsecs.core.builder.Auditor.runAudit(Auditor.java:140)
... 4 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: TreeWalker is not allowed as a parent of RegexpHeader
at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:163)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
... 8 more
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs (Deprecated - use Github)"
test file
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs (Deprecated - use Github)"
screenshot with exception
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs (Deprecated - use Github)"
After some time i eventualy figured out the rule that was causing me problems.
But after removing it, eclipse-cs still throws an exception related to a supposedly wrong RegExp which leaves me now clueless.
For that purpose, i proposed a validation of the RegExp rules directly in the input fields, as in:
https://sourceforge.net/tracker/?func=detail&aid=3137961&group_id=80344&atid=559497
Last edit: Anonymous 2015-01-16
I suppose you tried to use an old Checkstyle 4.x configuration with the 5.x plugin.
That won't work directly since Checkstyle 5 brought some incompatible changes, see their release notes: http://checkstyle.sourceforge.net/releasenotes.html
Regarding Regexp rules, the feature you're asking for already exists - just not for RegexpHeader being a special case, where you provide multiple regexp (one for each header line) separated by \n.
Check out some other modules using regex, e.g. the naming checks.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).