-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support checking of test classes #5
Comments
Apparently, animal-sniffer does not yet check test code: mojohaus/animal-sniffer#5
Apparently, animal-sniffer does not yet check test code: mojohaus/animal-sniffer#5
I was hoping to use this project as a way to finally move away from |
Would love to see this resolved as well |
Ditto. |
@olamy I'd take a stab on this, but first we need to decide whether this should become a new mojo or not. Since the usage site recommends |
@famod yes try that. sorry for long response time |
I then built locally and my test code is detected. However I tried to use the snapshot on one of my projects and it failed. This code reproduces the problem:
I get
here's the pom, this time all set for java 8:
|
Confirmed. I get loads of such errors in https://github.com/vackosar/gitflow-incremental-builder |
Ok, first problem found! At least scope test is missing here: https://github.com/mojohaus/animal-sniffer/blob/master/animal-sniffer-maven-plugin/src/main/java/org/codehaus/mojo/animal_sniffer/maven/CheckSignatureMojo.java#L387-L388 That reduces the number of false negatives but it is not sufficient. Investigating... |
Ok, I found the second problem. I'll create another PR but that will take some time because I need to look at the enforcer rule and I'd also like to add a test. @olamy Can we reopen this? Thanks. |
PR #81 should fix the false negatives. |
@THausherr This should now work as expected (built from |
Yes, thank you. I was able to successfully verify Apache PDFBox trunk, 2.0 branch and 1.8 branch. |
Our problem (see at https://issues.apache.org/jira/browse/PDFBOX-2891) is that we'd like test classes to be checked too. This was proposed before:
http://mojo.10943.n7.nabble.com/Fwd-animal-sniffer-for-maven-test-classes-td43156.html
I don't know if "binkley" ever followed up on his patch proposal. I built the plugin locally and used this pom:
Here's the "bad" code:
The error (the use of isEmpty() which is not supported by JDK5) was not detected.
The text was updated successfully, but these errors were encountered: