How do i disable a specific resharper inspection across an entire project?

Asked by : melany wijngaard 2021-03-22 03:17

Resharper alerts me about public functions that are never accessed. This is useful in most areas in my code, but I have a project that contains classes that function as a public API (actually Hot-Chocolate GraphAPI functions), so, naturally, there are no calls to them elsewhere in the code. I don't need Resharper to tell me about them.

I know it's possible to disable these kinds of warnings per file by including a comment. I'm wondering if there is a way to disable this warning across an entire project.

N.B. I don't want to disable Resharper itself in this project (as described in this answer). Resharper is still providing value to me and it's just this specific warning that I want to disable.

3 Answers

0 votes
arlo jackson
Answer by : arlo jackson

ReSharper's help lists various ways to disable a specific inspection. You can disable a specific inspection in a scope either using an .editorconfig file, or with a ReSharper settings file.

arnaud lo
Answer by : arnaud lo

Following the link provided (thanks @IgorAkhmetov) I created an .editorSettings file in the scope I wanted (the root of the single project) with the following contents:

 resharper_unused_member_global_highlighting = none
resharper_class_never_instantiated_global_highlighting = none

Outcome: Resharper stopped telling me about unused public members, or uninstantiated public classes, in that project only. It carries on telling me about those problems in the rest of my codebase.

leo pierce
Answer by : leo pierce

Option "Solution-wide inspections" can be turned off in project's properties: enter image description here

Related Posts
Related Posts
Resharper analyses files when solution i...
clotildes da rosa clotildes da rosa
2022-02-02  7:16am 2022-02-02 7:16am
Is there a ReSharper or similar extensio...
debbie may debbie may
2022-02-09  6:51am 2022-02-09 6:51am
Unindent on Backspace for Roslynator...
irene morales irene morales
2022-02-12  5:07pm 2022-02-12 5:07pm
How to remove re-occurring lines with sp...
nella kangas nella kangas
2022-02-21  8:53pm 2022-02-21 8:53pm
How to avoid getting "possible "null"ass...
jeremy weiss jeremy weiss
2022-02-23  8:00am 2022-02-23 8:00am