Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together. We have configured the PMD eclipse plugin to use a ruleset file local to our project. See attached.pmd from one of our projects. This did not work.
I am using PMD under eclipse 4.3.1 / Kepler and I cannot exclude files and folders from the violation check.
My folder structure
Now following folders get generated by testng
Eclipse Pmd Ruleset File Size
Now I have configured following rules file:
In my case I have many hundred errors in the jquery.js file, which is in test-output.
How can I exclude a specific folder and all files in it recursively?
How to set the pattern to work under eclipse and under ANT/maven?
hint: seems to be similar to: PMD exclude not working
2 Answers
You almost got it already! Use the following exclusion syntax:
This will exclude all files that have /test-output/
somewhere in their absolute path. The pattern is the same in Eclipse and Ant/Maven, as long as the excluded folders are also called test-output
.
Additional explanations and examples can be found in the PMD documentation.
barfuinbarfuinYou can specify a working set under Project -> Properties -> PMD
Marco SullaMarco SullaRuleset File
Not the answer you're looking for? Browse other questions tagged eclipsepmd or ask your own question.
I find PMD very useful tool. So I have installed PMD eclipse plugin.
With PMD, we can define multiple ruleset files. One of the reason I have multiple rulesets file is that I need to exclude some classes from some rules say naming rules but not all. I achieved this by defined those rules in a separate ruleset file and using element. This is fine as far ant build is concerned. However, I would like to use the same ruleset files for PMD eclipse plugins to ensure that executing PMD using ant or eclipse generates same result.
I do not see an option to select multiple ruleset files for PMD eclipse plugin. Is there a way to select multiple ruleset files or any other alternative?
Please help.
Thanks
Eclipse Pmd Ruleset File Free
ChirEclipse Pmd Ruleset File Download
Chir1 Answer
A rulesets references rules and built-in rulesets - and it can reference custom rulesets too. Just create a wrapper-ruleset.xml for basic-ruleset.xml and codesize-ruleset.xml:
You can then use wrapper-ruleset.xml in Eclipse.