Home Java Java-tips Background 30java_tools Style and Correctness Checkers

Ask Questions?

View Latest Questions

Advertisement


 
 

Style and Correctness Checkers
Posted on: July 26, 2006 at 12:00 AM
Style and Correctness Checkers in Java.

Java Notes

Style and Correctness Checkers

PMD
Description: PMD checks for a long list of possibly bad programming practices and possible error conditions in source programs. My feeling about it is mixed -- it is undoubtedly very useful, but the number of warnings about things which were actually ok were excessive. Of course, what I should be doing it tuning the rules so it diagnoses what I think is important. I've used it from jEdit but found the interface difficult. "PMD has plugins for JDeveloper, JEdit, JBuilder, NetBeans/Sun ONE Studio, IntelliJ IDEA, TextPad, Maven, Ant, Eclipse, Gel, and Emacs."
URL: pmd.sourceforge.net
Checkstyle
Checks style for adherence to coding standards, eg, Sun. I've used it as a jEdit plugin. One nice feature is that it nags about providing javadoc comments.
URL: checkstyle.sourceforge.net/
FindBugs
Looks for bugs in Java code. Open-source, free. There's an article on its use at FindBugs, Part 1: Improve the quality of your code.
URL: findbugs.sourceforge.net
Java Coding Standard Checker
From Cafe au Lait Java News site: "Ralph Jocham's posted version 0.95 of JCSC (Java Coding Standard Checker), a configurable tool for checking Java source code for adherence to standard conding conventions such as naming conventions, code structure, class size, and line length. According to Rocham, version 0.95 "has been completely refactored. The core is now XML driven which makes the adding of further rules faster. Also, rules can be en-/disabled on a case by case basis and each rule can have a priority assigned. The priority can be used to group the parse results. These changes are reflected in an improved UI -- both in the ruleseditor and the generated XML/HTML documents. JCSC now supports CruiseControl2. This release also includes various bug fixes."
URL: jcsc.sourceforge.net
Jalopy
Source code formatter. Very active support and available as plugin in many IDEs. Check out this short article on Jalopy. There is now a $40 successor to Jalopy.
URL: jalopy.sourceforge.net/
JLint
Description: Checks Java programs for errors. Basis for CodeLint jEdit plugin. Looks for a limited number of errors in source or class files. Not very useful when I tried it.
URL: http://artho.com/jlint/index.shtml
Articles
Advertisement


DMCA.com