PMD scans Java source code and looks for potential problems like:
- Possible bugs - empty try/catch/finally/switch statements
- Dead code - unused local variables, parameters and private methods
- Suboptimal code - wasteful String/StringBuffer usage
- Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
- Duplicate code - copied/pasted code means copied/pasted bugs
PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.
PMD is free software and licensed under a "BSD-style" license:
PMD is highly customizable tool. You don't have to wait for PMD to get around to implementing feature requests, Writing your own PMD rules is cool because there are two way to write rules:
* Write a rule using Java
* Write an XPath expression
- PMD Home
- Integrate PMD with IDE's home
- Sites/Articles about PMD
- How to write a PMD rule