When using generators to generate parts of the java code in an Eclipse project (e.g. generating code from EMF/Ecore models) the generated code does not conform to the PMD rule set. This results in a huge amount of rule violations.
It would be nice to be able to configure PMD in the project properties to ignore/exclude specific packages.
This feature is already available via the include/exclude patterns in a RuleSet. See the appropriate section on the website:
http://pmd.sourceforge.net/howtomakearuleset.html
As a further example, this is the section out of the dogfood RuleSet we use on the PMD code itself.
This feature is currently exposed in the Eclipse IDE at the Workspace level. It is not available yet at the Project level, unless you are using an explicit external RuleSet per project (not the IDE GUI defined ones).
I am not going to close this out, because of the possible future enhancement of supporting include/exclude on the Project Properties editor directly.
In the meantime, you have at least 2 options, setup patterns on the Workspace, or configure your Project to use an external RuleSet and customize it as needed.
Great! This absolutly solves my problem. Thanks for the tip.
Good idea to let the ticket open.
It would be nice to allow exclusion or personalization at the rule level (not only at the ruleset one).
For example I have a bean model package whose the classes map db tables. Some tables have many columns and thus they been have a lot of attributes and public methods.
T