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

Disable warning for methods based on attribute #2156

Closed
marcospgp opened this issue May 19, 2021 · 4 comments
Closed

Disable warning for methods based on attribute #2156

marcospgp opened this issue May 19, 2021 · 4 comments

Comments

@marcospgp
Copy link

I'd like to disable warning IDE0051 for all methods with the [PunRPC] attribute, like so:

image

Is there a way to do this in the omnisharp settings?

Thank you!

@333fred
Copy link
Contributor

333fred commented May 23, 2021

There is not, no. You can make a DiagnosticSuppressor (similar to making analyzer) that could do such a thing. But this isn't something OmniSharp can control.

@marcospgp
Copy link
Author

@333fred do you have any references on how I could go about writing such a thing? Thanks!

@333fred
Copy link
Contributor

333fred commented May 29, 2021

@mavasani do we have documentation on DiagnosticSuppressors anywhere?

@filipw
Copy link
Member

filipw commented Jul 1, 2021

The support for suppressors in OmniSharp was merged here #2182
The PR contains a super basic suppressor example too.

I will close this PR because there is nothing left for OmniSharp to do here - thanks

@filipw filipw closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants