Best PracticesChoose the rules that are right for youRunning every ruleset will result in a huge number of rule violations, most of which will be unimportant. Having to sort through a thousand line report to find the few you're really interested in takes all the fun out of things. Instead, start with some of the obvious rulesets - just run unusedcode
and fix any unused locals and fields.
Then, run basic
and fix all the empty PMD rules are not set in stoneTODO - generally, pick the ones you like, and ignore the warnings you don't like. It's just a tool. PMD IDE plugins are niceUsing PMD within your IDE is much more enjoyable than flipping back and forth between an HTML report and your IDE. Most IDE plugins have the "click on the rule violation and jump to that line of code" feature. Find the PMD plugin for your IDE, install it, and soon you'll be fixing problems much faster. Suggestions? Comments? Post them here . Thanks! |