Skip to content

Rule Inspection

Rule inspection is used to inspect the rule set and list files. This essentially means check for inconsistencies, duplicates, similarities, unreferencies and so on to fix them and therefore optimize the project.

Start Rule Inspection

  1. Select the Console tool window, then the Rule Inspection tab.
  2. Select Inspect .
  3. Select the Inspection scope in the Code Inspection window.

    Note

    The Inspection scope can be:

    • Project, includes all the rules of the project.
    • All opened rules in the editing area.
    • Current rule file in focus in the editing area.
  4. Select Settings if you want to change settings about an inspection, for example restore suppressed or ignored rule inspection from the current project or from all the projects.

  5. Select OK to confirm.

Check the result of an inspection

After an inspection a possible report list is displayed in the left panel. At first, each row groups a specific problem, for example:

  • Orphan files, files that don't have any reference in the project.
  • Similar files, files that have duplicate parts and so eligible for merging.
  • Equal files, files that are totally equal and so they are redundant.
  • Empty files, files that don't contain any items.

  1. Select to expand the problem groups or the file groups.
  2. Select a row to watch the description and the details in the right panel.

Expand all the groups

  • Select Expand All for a complete list view.

Collapse all the groups

  • Select Collapse All for a compact list view.

Display the code section that shows the inspected potential problems

  • Double-click a file item to display it, highlighted in pale yellow, in the editing area.

Suppress an inspection for a group or for a file

Suppress an inspection means that the inspection will be suppressed from the project or in all the projects until the possible restoration.

  1. Select a row in the right panel.
  2. Select the inspection suppression type among the ones suggested in the left panel.

Ignore an inspection for a group or for a file

Ignore an inspection means hide the inspection until the next run or the reset.

  1. Select a row in the right panel.
  2. Select the ignore instance type among the ones suggested in the left panel.

Restore suppressed or ignored inspections from the current project

  1. Select Suppressed Inspections and Files in the toolbar.
  2. Select Code Inspection > Current Project.
  3. Select

    • an inspection to restore, then Remove .

    Or:

    • Remove all to restore all the inspections.
  4. Select Yes to confirm.

Note

Start a Rule Inspection to display the restored inspections.

Restore suppressed or ignored inspections from all the projects

  1. Select Suppressed Inspections and Files in the toolbar.
  2. Select Code Inspection > All Project.
  3. Select

    • an inspection to restore, then Remove

    Or:

    • Remove all to restore all the inspections.
  4. Select Yes to confirm.

Note

Start a Rule Inspection to display the restored inspections.

Reset ignored inspections

  1. Select Suppressed Inspections and Files in the toolbar.
  2. Select Code Inspection > Current Project.
  3. Select Reset to restore the ignored inspections.
  4. Select Yes to confirm.