In previous article we have shown how to install and run PMD plugin in NetBeans and how to interpret the analysis report. In this tutorial we will show how to choose rules that are applicable to our project and how to define our own rules if predefined doesn’t satisfy our need.
Entries tagged as ‘code quality’
Customizing PMD rules on NetBeans 6.5
December 2, 2008 · 1 Comment
Categories: netbeans
Tagged: code quality, java, netbeans
Install and Use PMD plugin on NetBeans 6.5
November 28, 2008 · Leave a Comment
There are more than few tools that help us maintain the code we write correct and working. We can divide them in source code and class file analyzers.
One of them is PMD, tools that is actively developed since year 2000. It is mature and provides integration with all important IDEs. On the PMD website, developers say that PMD checks:
- 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
In this article we will show how it can be installed and used in NetBeans 6.5.
Categories: netbeans
Tagged: code quality, java, netbeans
Installing and using Code Coverage plugin in NetBeans 6.5
November 26, 2008 · 7 Comments
One of techniques to ensure that software is properly and thoroughly tested is to get code coverage information and find which blocks of code weren’t executed at all.
There is a number of code coverage tools for Java applications. One of them, free and mature is Emma ( http://emma.sourceforge.net/ ) which is one used by NetBeans code coverage plugin.
Installing plugin
To install plugin, select Tools -> Plugins and choose “Code Coverage” in the list of available plugins:
Categories: netbeans
Tagged: code quality, java, netbeans, tools
