CSJ
CSJ

Reputation: 3941

How do I disable a specific Resharper inspection across an entire project?

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.

Upvotes: 5

Views: 2116

Answers (3)

Ivan Serduk
Ivan Serduk

Reputation: 451

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

Upvotes: 0

CSJ
CSJ

Reputation: 3941

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.

Upvotes: 1

Igor Akhmetov
Igor Akhmetov

Reputation: 1930

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.

Upvotes: 0

Related Questions