Summary
PMD is an open-source project that helps analyze Java source files, reports on possible bugs, dead code, suboptimal code, cyclomatic complexity, and is highly configurable with a series of rules. The latest PMD release adds more code checking rules, including rules for working with JSF.
Advertisement
PMD is a highly configurable code quality tool for Java. Among its key features are customizable rule sets, and the latest PMD release adds rules for String-related code, and for JSF. PMD can be configured as part of a build process to scan Java source code and find problems such as:
Possible bug, such as empty try/catch/finally/switch statements
Dead code, such as unused local variables, parameters and private methods
Suboptimal code, including wasteful String/StringBuffer usage
Overcomplicated expressions, e.g., unnecessary if statements, for loops that could be while loops
Duplicate code - copied/pasted code means copied/pasted bugs
PMD is already integrated with most Java IDEs.
Do you use code-quality tools such as PMD as part of your build process? If so, how often do you run these tools on your code?
I don't think that many projects are using any tool like PMD. I have not used PMD, but the general impression seems to be that tools like these generate a lot of useless warnings / information. I would tend to agree for most tools in the market that do static analysis. Vijay. www.geocities.com/vijay_nathani