Closed ptanov closed 4 years ago
If i would build this kind of exclusions into the eclipse plugin then it would lead to "works on my machine" problems, i.e. you wouldn't see the violations but everyone else would see them.
Can I ask why you don't or can't suppress warnings with annotations or comments, exclude files with exclusions in the pmd configuration or even simply remove the rule from the ruleset file?
Hi @acanda, I see your point and I agree with it for a newly created project. Thanks for the fast reply!
My use case is applying PMD rules into existing project. In order to do so I'm suppressing all current warnings and later me and my team will clean "legacy" warnings in batches.
When I'm starting to use PMD in an existing project I start with an empty rulest file, add a first rule and fix the issues, then add a second rule and fix the issues and so on. This way you can start using PMD at your own pace and still use PMD in your build without having any rule violations.
There is always more then one option :) Thanks for your suggestion. If you don't see value in this functionality I'll close the ticket and we will probably try to fix the issues on the fly.
This feature is available in maven plugin: https://maven.apache.org/plugins/maven-pmd-plugin/examples/violation-exclusions.html.
Thanks!