IntelliJ IDEA 2017.1 Help

Configuring Inspection for Different Scopes

On this page:


By default, all enabled code inspections apply to all project files. If necessary, you can configure each code inspection (enable/disable, change its severity level and options) individually for different scopes. Such configurations, like any other inspection settings, are saved and applied as part of a specific profile.

There may be complicated cases when an inspection has different configurations associated with different scopes. When such inspection is executed in a file belonging to some or all of these scopes, the settings of the highest priority scope-specific configuration are applied. The priorities are defined by the relative position of the inspection's scope-specific configuration in inspection settings: the uppermost configuration has the highest priority. The Everywhere else configuration always has the lowest priority.

Defining the order of scopes

To define the order of scopes, follow these steps

  1. In the Inspections page of the Settings/Preferences dialog, click the button In All Scopes:
  2. Choose Edit Scopes Order... from the scopes drop-down list.
  3. In the Scopes Order dialog box that opens, select the desired scope, and click the up and down arrows /help/img/idea/2017.1/arrowUp.png/help/img/idea/2017.1/arrowDown.png:

See Also



Last modified: 18 July 2017