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

Suppress Unnecessary @SuppressWarning("deprecation") #1793

Closed
alexkoay opened this issue Jun 4, 2021 · 2 comments
Closed

Suppress Unnecessary @SuppressWarning("deprecation") #1793

alexkoay opened this issue Jun 4, 2021 · 2 comments

Comments

@alexkoay
Copy link

alexkoay commented Jun 4, 2021

Is there any way to suppress such errors?
I'm using protobuf to generate some Java code and a ton of such warnings (the only ones) are appearing.

Alternatively is there a way to configure the LS to ignore certain files / directories / packages?

@rgrunber
Copy link
Contributor

rgrunber commented Jun 4, 2021

Yes. Though not well documented :

If you create a file under your workspace folder called .settings/org.eclipse.jdt.core.prefs and populate it with :

org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore

This should disable it. There's an issue (with PR) that will hopefully simplify this process a lot by introducing a code action to autmoatically allow ignoring these options. redhat-developer/vscode-java#1791 .

You can also customize the location of the settings file with java.settings.url . There is a pretty good description of this at https://github.com/redhat-developer/vscode-java/wiki/Settings-Global-Preferences but the property discovery is what we hope to improve.

@rgrunber
Copy link
Contributor

Marking this as closed. The issue I referenced from above is where we hope to make it easier to discover these (once I get some time to finish off the PR).

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