Change inspection severity
Inspection severity indicates how seriously the detected code issues impact the project and determines how the detected issues are highlighted in the editor. By default, each inspection has one of the following severity levels:
- Server problem
- Typo
- No highlighting, only fix
- Weak Warning
- Warning
- Error
You can increase or decrease the severity level of each inspection. For example, you can force RubyMine to display some warnings as errors or weak warnings. In a similar way, what is initially considered a weak warning can be displayed as a warning, an error, or just as a reference information.
You can also configure the color and font style used to highlight each severity level. Besides, you can create custom severity levels and set them for specific inspections.
If necessary, you can set different severity levels for the same inspection in different scopes.
All modifications to inspections mentioned above are saved in the inspection profile currently selected in the inspection settings and apply when this profile is used.
Inspection severity levels indicate how seriously the detected code problems affect your project. Every severity level has its own highlighting style. In RubyMine, there is a set of predefined severity levels:
Error
Warning
Weak Warning
Server Problem
Typo
No highlighting, only fix
Change inspection severity in all scopes
-
In the Settings/Preferences dialog (Ctrl+Alt+S), go to , and select the profile that you want to modify.
Select the necessary inspection from the list. Make sure that it is enabled.
-
From the Severity list, select a new severity level. You can also right-click the inspection and select the severity level from the context menu.
Apply the changes and close the dialog. The modified inspection will now have the new severity level in the selected profile.
If the list of available severity levels lacks the one that you need, you can create a new one.
Change inspection severity in specific scopes
-
In the Settings/Preferences dialog (Ctrl+Alt+S), go to and select the profile in which you want to make changes.
Select the necessary inspection from the list. Make sure that it is enabled.
-
From the In All Scopes list, select the scope for which you want to change the severity.
RubyMine shows severities for two scopes: the selected one and Everywhere else.
To add one more scope, click . If you want to create a new scope, select Edit Scopes Order from the list of scopes and click .
-
Select the necessary severity level from the list and apply the changes.
If you enable an inspection in multiple scopes, and files in these scopes match, the IDE will process these scopes according to their order in the list. For more information, refer to Change the order of scopes.
Configure error highlighting
-
In the Settings/Preferences dialog (Ctrl+Alt+S), go to and select the profile in which you want to make the changes.
From the list of severity levels, select Edit severities.
Select the severity for which you want to change the formatting and click Edit Settings | Colors & Fonts.
-
Configure the new highlighting rules. Use the preview section at the bottom of the dialog.
You can also modify highlighting in the settings under
.Create a new severity level
-
In the Settings/Preferences dialog (Ctrl+Alt+S), go to and select the profile in which you want to create a new severity level.
Click any inspection and select Edit severities from the list of severity levels.
In the Severities Editor dialog, click and name the new severity level.
Configure the formatting and set a priority using the and buttons — the higher you put the severity on the list, the higher its priority.
Click OK when finished.