Issue Type: New Feature New Feature
Affects Versions: 1.7
Assignee: Stephen Connolly
Components: Maven Plugin
Created: 04/Sep/12 5:22 PM
Description:

A violation line such as

Undefined reference: java/io/IOException.<init>(Ljava/lang/Throwable;)V in ~/src/myprj/target/classes/pkg/Clazz.class

is awkward to deal with. There is no hyperlinking to the source file if you are using an IDE (or Emacs compile-mode etc.), and there is not even a line number, so you have to find and open pkg.Class manually, and then search for new IOException and try to find the faulty line of code.

SignatureChecker.CheckingVisitor.visitMethod should override visitLineNumber to start with. And the animal-sniffer component should define an optional way to associate a sourcepath, not just a classpath, with the input; if a reported class has a matching source file, produce a hyperlinkable line:

~/src/myprj/src/main/java/pkg/Clazz.java:44: Undefined reference: java/io/IOException.<init>(Ljava/lang/Throwable;)V

At least animal-sniffer-maven-plugin could pass in src/main/java/ plus any generated source roots defined in the project, which would typically suffice.

Would also be nice to report references in Java source syntax whenever possible:

~/src/myprj/src/main/java/pkg/Clazz.java:44: Undefined reference: new java.io.IOException(java.lang.Throwable)
Project: Mojo Animal Sniffer
Priority: Major Major
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to