JetBrains Rider 2021.1 Help

Ignore Parts of the Code

In most solutions, there are parts of the code where you want to disable some or all of JetBrains Rider features. This topic lists all available ways to make JetBrains Rider ignore specific parts of the code.

Disable code inspection for parts of the code

ScenarioMinimize unwanted results in design-time code inspection and code inspection in specific scope by ignoring parts of code that you are not going to improve.
How to ignore
  • To ignore the current file, press Ctrl+Alt+Shift+8.

  • To ignore a part of a file, add the // ReSharper disable All comment before the ignored part and // ReSharper restore All after it.

What is disabledAll code inspection features.

Disable code inspections with lower severity levels in generated code

ScenarioIgnore generated parts of the code to minimize unwanted results in design-time code inspection and code inspection in specific scope but do not ignore errors and warnings in that parts to make sure that the generated code compiles.
How to ignoreList specific files and folders, file masks, or names of regions containing generated code on the Editor | Inspection Settings | Generated Code page of JetBrains Rider settings Ctrl+Alt+S.
What is disabledCode inspections with lower severity levels as well as code cleanup.
Last modified: 13 July 2021