I recently acquired Crap4j, and ran it but got the following error:
No test found. Is project built?
I’m wondering:
- What tests does Crap4j need access to? Shouldn’t it just statically analyze the source?
- Are there any other heuristic-based code quality analyzers which are integrated well with Eclipse (hopefully also Jenkins and ant)?
I have had a great experience with Checkstyle, and the associated checkstyle visualizations in Jenkins. I am hoping to now try to install a more intelligent analyzer to run alongside Checkstyle.
At our project, we have checkstyle, PMD and FindBugs running together. Checkstyle for checking naming conventions, PMD for some rule enforcement like handling exceptions properly and no unused variables, and FindBugs for things like potential NullPointerExceptions.
Crap4J doesn’t really search for bugs, it just checks that your code is covered with tests. For that, it tries to find JUnit tests to run to measure code coverage. It’s better than the standard code coverage tools, because it weighs code coverage with cyclomatic complexity.