acanda / eclipse-pmd

eclipse-pmd has been moved to
https://github.com/eclipse-pmd/eclipse-pmd
Other
21 stars 10 forks source link

Developer should be able to exclude violation #67

Closed ptanov closed 4 years ago

ptanov commented 5 years ago

This feature is available in maven plugin: https://maven.apache.org/plugins/maven-pmd-plugin/examples/violation-exclusions.html.

Thanks!

acanda commented 5 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?

ptanov commented 5 years ago

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.

acanda commented 5 years ago

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.

ptanov commented 5 years ago

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.