2

I've written a custom AuditListener that works fine when run from the command line using maven, but when trying with checkstyle inside eclipse I get the following error message - "cannot initalize module TreeWalker - Unable to instantiate com.xyz.MyAuditListener".

I've been googling for quite a bit, and have tried following the steps both on http://eclipse-cs.sourceforge.net/extending_custom_checks.html and http://jgonian.wordpress.com/2010/12/12/maven-checkstyle-and-eclipse/

The parent pom has the project in which MyAuditListener exists as a dependency, both under the maven-checkstyle-plugin and maven-eclipse-plugin. The actual project pom of the custom audit listener adds "Eclipse-registerBuddy: net.sf.eclipsecs.core" to the manifest.

Inside eclipse, in the Preferences-> Checkstyle menu, I can see MyAuditListener under the 'Other' tab (along with TreeWalker and Checker), and can even change the properties of it.

I'm looking for ways of either solving the eclipse issue, making eclipse ignore the custom audit listener completely (as it doesn't really make sense in the IDE), or to fix my original problem - which was to generate two reports, one of which contains only the errors (not warnings).

Ed Cresswell
  • 123
  • 1
  • 7

0 Answers0