Finding Code Issues in Specific Scope
Design-time code inspection is a great help when you are coding in the editor or reviewing specific files. However, Rider also allows you to run static code analysis in the whole solution or narrower scope and examine the results in a friendly view.
In this section:
Starting code inspection
To inspect code in solution, project or in a custom scope
- Decide whether you want the results of the solution-wide inspections (e.g. unused public members) to be included in the report. If you want these results to be included, enable the solution wide-analysis. Note that when the solution-wide analysis is enabled, Rider has to analyze the whole solution even if you need to inspect a single project, so be prepared that it takes more time.
- Do one of the following:
- In the main menu, choose
- You can also inspect code in the desired scope with a single inspection of your choice — for example, you may want to check whether there are properties that could be converted to auto-properties.
To run a single inspection, press Ctrl+Shift+Alt+I or choose from the main menu, and then start typing the name of the inspection:
- In the dialog that opens, specify the scope where the code should be inspected.
- The Inspection Results window will open displaying detected code issues.
Analyzing inspection results
Each new run of code inspection opens a new tab in the window so the results of previous runs are preserved until you close their tabs.