Running Code Inspection in Specific Scope
In this topic:
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 need it, then enable the solution wide-analysis. Note that when the solution-wide analysis is enabled, ReSharper 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:
- On the main menu, choose or .
- In the Solution Explorer, select items (files, folders, projects, solution folders) that you want to inspect, right-click the selection and choose Find Code Issues in the context menu.
- In the Architecture View, select one or more items, right-click the selection and choose Find Code Issues in the context menu.
- The Inspection Results Window will open automatically after code inspection finishes running.
Analyzing inspection results
In the Inspection Results window, you can view the list of discovered code issues and navigate to them by double-clicking the entries:
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.
By default, issues are grouped by files. If necessary, you can regroup issues by type, severity, etc. using the Group by: selector.
To check context of the selected code issue, use the Preview pane that displays one or more lines related to the issue in the code file. Use the Show Preview selector to open the pane in the bottom or on the right of the window.
Filtering inspection results
When you run code inspection, ReSharper finds code issues with all severity levels. However, issues with severity levels of 'Hint' and 'Do not show' are filtered out by default. If necessary, you can customize filtering of code issues.
Note that the selected filtering affects the way code issues are filtered in the current tab and the way issues are filtered the next time you run code inspection.
To filter issues in the inspection results
- If you want to hide issues of some type or hide all other issues except issues of this type, right-click a code issue and choose Hide All [Issue type] Issues or Show Only [Issue type] Issues correspondingly.
- For more precise filtering, click Filter Issues on the toolbar and use the Filter Issues dialog box to specify issue types that should be displayed. The Defaults button in this dialog restores the default filtering when issues with severity levels of 'Hint' and 'Do not show' are filtered out.