On Fri, Jun 13, 2008 at 6:11 AM, Max Berger <[EMAIL PROTECTED]> wrote:
> Vincent Hennebert schrieb: > >> 18000 PMD violations is just sick. Things like rule [1] doesn't really > help > >> the source code. We can do that if we get a budget for > nuclear-power-plant-grade > >> software. > > Same here I guess. Now may be the right time to launch the debate, > > actually. I'll try to gather some energy in the next days for that. > > PMD contains many different check sets. The main reason for the large > number of violations is that I've enabled many of the check-sets, among > those "optimizations" and "design", which are responsible for the large > number of error messages. Maybe we should start with the "basic" set and > go from there? > > >> [1] > http://pmd.sourceforge.net/rules/optimizations.html#MethodArgumentCouldBeFinal > Many PMD Rules catch bugs, others are highly subject and indicative of style/policy choices about how code should be written. I've never personally just used every Rule in a particular RuleSet (e.g. all of "basic" or "optimizations"). In an existing code base, that's a sure way to get drowned in noise. The approach I take is to build a custom RuleSet by (1) evaluating all PMD rules to decide which ones I'd want to even use (2) reassign priorities based upon how important I find the particular Rule. For existing codebases, it works best to start with a small RuleSet, incrementally adding more Rules as you evolve your codebase to be compliant with your Rules. If you're starting a new code base, feel free to apply as many Rules as you want, although if you don't following the Rules, you'll soon be drowned in noise again. This said, I'm one of the devs on the PMD project, if you have generic questions on PMD, feel free to post questions on our forums and I'll answer them there (fop-dev isn't appropriate). I've made great use of FOP on projects before, and I greatly respect the work everyone has put into FOP. I would be more than happy to answer any FOP specific PMD usage questions personally, just email me directly. Ryan