WebStorm 9.0.0 Web 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 scope-specific configurations for an inspection

  1. In the inspection settings, select the desired profile. The inspections associated with the profile are displayed in the tree view.
  2. Select the desired inspection or inspection group and click Add Scope add on the toolbar.
  3. In the Choose Scope dialog box that opens, select a scope to configure an inspection for.
    The new scope-specific configuration In scope '<scope name>' as well as the configuration for the rest of the files Everywhere else will ba added to the inspection.
  4. Select the scope-specific configuration and customize it as necessary: enable or disable it, change its severity and the other options, which can be different for various inspections.
  5. Customize the Everywhere else configuration to define the inspecion behavior out of the scope.
  6. If necessary, add more scope-specific configurations for the inspection.
  7. If there are several scope-specific configurations, define their relative priorities: select a configuration and click Move Scope Up arrowUp / Move Scope Down arrowDown
  8. Apply changes.

See Also

Concepts:

Procedures:

Reference:

Last modified: 15 October 2014
comments powered by Disqus