Where ReSharper executes its own code inspections (as opposed to compiler errors and warnings), you can
specify whether to
display them as
NoteCompiler errors and warnings that ReSharper highlights are not configurable the way that ReSharper's own inspections are. However, with some compiler warnings, you can use
#pragmadirectives to suppress them. Look for this action in the list of ReSharper's
That is, you can get rid of inspections that seem trivial or being of no interest, using code inspection severity options.
For example, you can force ReSharper to display warnings as errors or suggestions, or even not show them at all. In a similar way, what is initially considered a suggestion can be displayed as a warning or error, or be hidden.
One way of dealing with ReSharper inspections is to
Another good thing is that you can define you own inspections based on structural search and replace
patterns, and specify
severity level for them. For more information, see
- On the main menu, choose ReSharper | Options.
- Select Code Inspection | Settings.
- Make sure that Enable code analysis is selected.
- Open the Code Inspection | Inspection Severity category.
- Select an entry in the Inspection Severity tab.
- Click the drop-down list to the right of the selected entry, and choose one of four standard
- Click OK.
In ReSharper 4 or later, you can access inspection severity options right from the list of quick-fixes.
- Put the caret into a code position where a red or yellow bulb displays to the left of your code.
- Press Alt+Enter to open a drop-down list with a quick-fix for which you'd like to change inspection severity.
- In the drop-down list, choose Inspection options for [name of quick-fix]:
- In the Inspection options for [name of quick-fix] dialog box
that appears, change severity of an issue that the quick-fix is intended to fix, by selecting
any of the five
radio buttons: Error, Warning,
Suggestion, Hint, or Do not show:
- To change inspection severity for other issues, click Open options, which opens the traditional ReSharper | Options | Code Inspection | Inspection Severity tab. Otherwise, click OK to close the Inspection options for [name of quick-fix] dialog box.