Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore unknown @SuppressWarnings #507

Closed
ThadHouse opened this issue Apr 13, 2018 · 8 comments
Closed

Ignore unknown @SuppressWarnings #507

ThadHouse opened this issue Apr 13, 2018 · 8 comments

Comments

@ThadHouse
Copy link

I have project that has a lot of @SuppressWarnings annotations for pmd and checkstyle. The eclipse parser however does not know about these extra warning names, and because of this intellisense has a warning on every usage. This is a bug in the backing language server, but however the recommendation for years has been to disable all Unhandled Token warnings in eclipse. However, I can't find a way to set that from the vscode extension. I don't expect the actual backing issue fixed in here, but being able to disable that warning would be really helpful.

https://stackoverflow.com/questions/5017569/unsupported-suppresswarningspmd-donotcallsystemexit

warningmessage

@fbricon
Copy link
Collaborator

fbricon commented Apr 13, 2018

See eclipse-jdtls/eclipse.jdt.ls#581 (comment)
set org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore

@ThadHouse
Copy link
Author

That doesn't seem to work for that error. I have both done a full rebuild, along with a restart and I am still getting the warning.

@fbricon
Copy link
Collaborator

fbricon commented Apr 13, 2018

works for me, after a restart

@ThadHouse
Copy link
Author

Ah I didn't realize that the setting had to be set in every project, and not just the root. Is there any way to avoid that?

@fbricon
Copy link
Collaborator

fbricon commented Apr 13, 2018

not at the moment

@fbricon
Copy link
Collaborator

fbricon commented Apr 16, 2018

Related to eclipse-jdtls/eclipse.jdt.ls#624

@ThadHouse
Copy link
Author

We've been getting more and more complaints about this specific warning from our users. It seems kind of backwards that a warning specifically designed to suppress warnings is actually causing more warnings. I feel like that warning specifically should be silenced by default, because otherwise its backwards from what it actually is designed to do.

@fbricon
Copy link
Collaborator

fbricon commented Sep 2, 2019

"Unsupported SuppressWarning" warnings are now ignored by default. To get a different behaviour, one needs to set org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore|warning|info|error

@fbricon fbricon closed this as completed Sep 2, 2019
@fbricon fbricon changed the title Allow disabling of underlying language server settings Ignore unknwon @SuppressWarnings Sep 2, 2019
@fbricon fbricon changed the title Ignore unknwon @SuppressWarnings Ignore unknown @SuppressWarnings Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants