Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to disable ReSharper for a specific file?

Tags:

resharper

I want to tell ReSharper to ignore a few files in my project. Some of them are just too large (they contain canned test data). Some of them are just confusing it (with a mishmash of Silverlight and .NET code).

Is there a way to do this by putting a comment at the top of the file?

However it's done, it needs to be persistent (i.e. can be checked in), and per-file.

I found this, but it doesn't appear to be persisted.

like image 652
Roger Lipscombe Avatar asked Oct 04 '12 10:10

Roger Lipscombe


People also ask

How do I run a ReSharper code analysis?

ReSharper helps you resolve most of the discovered code issues automatically. All you need is to press Alt+Enter when the caret is on a code issue highlighted in the editor and check the suggested quick-fixes.


1 Answers

This may be a feature in a more recent version than the one available when the question was originally asked.

It is possible to suppress code inspection for a specific block (or file) by using the comments:

// ReSharper disable All  

and

// ReSharper restore All 

See here.

like image 103
Eli Algranti Avatar answered Sep 18 '22 19:09

Eli Algranti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!