Running every existing rule 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 selected specific rules, e.g. the rules that detect unused code from the category Best Practices and fix any unused locals and fields.
Then, run rules, that detect empty if
statements and such-like. You can find these rules in the category Error Prone.
After that, look at all the categories and select the rules, that are useful for your project. You can find an overview of the rules on the Rule Index.
Use the rules you like via a custom ruleset.
PMD rules are not set in stoneGenerally, pick the ones you like, and ignore or suppress 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!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4