Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Suppress "Unsupported @SuppressWarnings("PMD")" warning #5

Closed
acanda opened this issue Jun 23, 2013 · 3 comments
Closed

Suppress "Unsupported @SuppressWarnings("PMD")" warning #5

acanda opened this issue Jun 23, 2013 · 3 comments
Assignees

Comments

@acanda
Copy link
Owner

acanda commented Jun 23, 2013

The Eclipse Java compiler creates warnings for unsupported @SuppressWarnings token. It would be nice if the eclipse-pmd plugin could suppress these warnings for the PMD and PMD.xyz token.

@ghost ghost assigned acanda Jun 23, 2013
@acanda
Copy link
Owner Author

acanda commented Jun 23, 2013

Unfortunately, the supported @SuppressWarnings token are hard-coded into the compiler and there is no possibility to extend the list of supported token or prevent the compiler from generating the warnings.

The only way to suppress these warning is to globally ignore all unhandled token in @SuppressWarnings:
Window > Preferences > Java > Compiler > Errors/Warnings > Annotations > Unhandled token in @SuppressWarnings: Ignore

@acanda acanda closed this as completed Jun 23, 2013
@slaout
Copy link

slaout commented Mar 23, 2016

This has the disadvantage that Eclipse does not report any unsupported token at all!

There is a bug report on Eclipse project: feel free to support this issue: bugs.eclipse.org/bugs/show_bug.cgi?id=392045

@acanda
Copy link
Owner Author

acanda commented Mar 23, 2016

There's also a much older issue on the Eclipse project for the same thing: https://bugs.eclipse.org/bugs/show_bug.cgi?id=122475
Feel free to support this issue as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants