user2508778
user2508778

Reputation: 137

How do you clean PMD generated violations Error or Warning in Eclipse

I clicked on my eclipse project to validate my code with PMD. It created huge errors and lot of warnings. However, I want to take them up later but the occurrence on the editor window is irritating me to work. Is there any way hide all those validation markers for some time.

Thank you,

Upvotes: 2

Views: 2559

Answers (1)

matt freake
matt freake

Reputation: 5090

If you just want them all to go away temporarily, use the "Clear Violations" menu item under PMD (to get there, I right click on the project in Package Explorer -> PMD -> Clear Violations). You can re-create the violations later by re-running PMD (PMD -> Check Code)

If there are specific violations you want to temporarily remove, you can you clear individual ones using the Violations Outline (Remove Violation when you right-click). Again, re-running Check Code will recreate it.

If you have checked the violation and decided it is a false positive, you can use the Violations Outline to "Mark as reviewed" and it will add a comment which means PMD will ignore it in future.

Upvotes: 3

Related Questions