Change Order of Scopes
By default, all enabled code inspections apply to all project files. If necessary, you can configure each code inspection (enable or 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.
Define the order of scopes
In the Inspections page of the Settings/Preferences dialog, click the button In All Scopes:
Choose Edit Scopes Order... from the scopes drop-down list.
In the Scopes Order dialog box that opens, select the desired scope, and click the up and down arrows :