Inspect rules and lists
Introduction
Inspecting rules and lists allows you to find unused files and full or partial duplicates, in order to clean-up the project and minimize repetitions. Use the Rule Inspection panel of the Console tool window to perform inspections.
Run inspections
- Select the Console tool window, then the Rule Inspection tab.
- Select Inspect .
-
Select the inspection scope from the drop-down menu.
Inspection scope can be:
- Project: all the rules and lists of the project.
- All opened rules files: all the rules and list files opened in the editing area.
- Current rule file: the file in focus in the editing area.
-
Set the similarity minimum value, that is the percentage of commonalities that two rules must have to be considered similar.
- Select the mixer button if you want to change settings, for example to restore suppressed or ignored inspections for the current project or for all projects.
- Select OK to confirm.
Check results
After running inspections, a report is displayed on the left of the panel.
The report shows the results as a tree structure. At the first level there are the inspections that have found issues.
For each inspection there are one or more groups of issues, and within each group there are the individual issues.
Info
In the description of the panel you will find more information about its contents, so to better interpret inspections and their results.
To expand and collapse the results use the Expand All and Collapse All commands on the toolbar or the expand/collapse buttons ( ) to the left of individual rows.
Show issue
To show the file or the rule an issue refers to:
-
Double-click an issue row of the left part of the panel.
Or:
- Select a group of issues on the left part of the panel.
- Select an issue link in the Details area inside the right part of the panel.
Suppress inspections
Suppressing an inspection means it will not be performed until possibly restored using the Studio settings window.
To suppress an inspection for the current project:
- Select a row on the left part of the panel.
- Select Current project... under Suppress current inspection type for: in the right part of the panel.
To suppress an inspection for all projects:
- Select a row on the left part of the panel.
- Select All projects... under Suppress current inspection type for: in the right part of the panel.
To suppress an inspection for a file of the current project:
- Select an issue row on the left part of the panel.
- Select Current file in current project... under Suppress current inspection type for: in the right part of the panel.
Ignore issues
Ignoring an issue, a group of issues or all the issues found by an inspection means hiding the issue(s) until the next run or until possibly restored using the Studio settings window.
To ignore an inspection until the next run:
- Select an inspection on the left part of the panel.
- Select Current run... under Ignore current inspection instances for in the right part of the panel.
To ignore an inspection until restored by changing Studio settings:
-
Select an inspection on the left part of the panel.
-
Select Ignore for project... under Ignore current inspection instances for in the right part of the panel.
To ignore a group of issues until the next run:
- Select a group of issues on the left part of the panel.
- Select Current run... under Ignore current inspection instances for in the right part of the panel.
To ignore a group of issues until restored by changing Studio settings:
- Select a group of issues on the left part of the panel.
- Select Ignore for project... under Ignore current inspection instances for in the right part of the panel.
To ignore an issue until the next run:
- Select an issue on the left part of the panel.
- Select Current run... under Ignore current inspection instances for in the right part of the panel.
To ignore an issue until restored by changing Studio settings:
- Select an issue on the left part of the panel.
- Select Ignore for project... under Ignore current inspection instances for in the right part of the panel.
Restore and reset inspections
To restore and reset inspections from the Rule Inspection panel of the Console tool window, select Suppressed Inspections and Files . The Studio Settings window will appear with the Rule Inspection group selected. Select the sub-group you need to work on.