PMD - ( Project Mess Detector?)
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.
Eclipse PMD plugin installation was straight-forward:
- Select "Help"->"Software Updates"->"Find and Install"
- Click "Next", then click "New remote site"
- Enter "PMD" into the Name field and "http://pmd.sf.net/eclipse" into the URL field
- Click through the rest of the dialog boxes to install the plugin
To run you just need right click on your source tree node and to choose "PMD/Check code with PMD".
Well thought to quit coding after FindBugs found about 300 bugs, but 2625 ... In PMD perspective view you could filter a found bugs by importans, it's about five categories. To generate HTML just right-click on project PMD/Generate reports.
Repors are have very simple view. all issues are not sorted by any criteria, so it make a very difficult to view about 2000 issues and to find a really something important to fix.
Conclusions: If you want to follow all java notations and standarts, write one of your own this tool is could be very usefull.
3 comments:
Nice blog... it is crucial to additionally use tools of tools for static code review and to make software more dependable and reliable.
xzc
Hello, this is fastidious post I actually loved reading this.
UI design firms
Post a Comment