CLion 2018.2 Help

Configuring Inspection for Different Scopes

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.

To define the order of scopes:

  1. In the Inspections page of the Settings/Preferences dialog, click the button In All Scopes:
    cl inspection 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 icons actions moveUp svgicons actions moveDown svg:
    cl scopes order
Last modified: 18 September 2018

See Also

Procedures:

Concepts: