AppCode 2020.2 Help

Configuring Inspection Severities

Inspection severity levels indicate how seriously the detected code problems affect your project. Every severity level has its own highlighting style. In AppCode, there is a set of predefined severity levels:

  • Error icon Error: marks syntax errors.

  • Warning icon Warning: marks code fragments that might produce bugs or require enhancement.

  • Weak Warning icon Weak Warning: marks code fragments that can be improved or optimized (redundant code, duplicated code fragments, and so on).

  • Server problem icon Server Problem: marks problems that come from an external build server, for example, from TeamCity.

  • the Typo icon Typo: marks spelling and grammar mistakes.

  • No highlighting, only fix: provides no code highlighting; the list of available fixes is invoked by pressing ⌥⏎.

Severity levels are designed to indicate problems, they don't have any impact on the code execution: if you change the severity for spelling mistakes from Typo to Error, this won't affect the execution of your application.

Change inspection severity in all scopes

  1. In the Preferences dialog ⌃⌥S, go to Editor | Inspections, and select the profile that you want to modify.

  2. Select the necessary inspection from the list. Make sure that it is enabled.

  3. 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.

  4. 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

  1. In the Preferences dialog ⌃⌥S, go to Editor | Inspections and select the profile in which you want to make changes.

  2. Select the necessary inspection from the list. Make sure that it is enabled.

  3. From the In All Scopes list, select the scope for which you want to change the severity.

    AppCode shows severities for two scopes: the selected one and Everywhere else.

    To add one more scope, click the Add button. If you want to create a new scope, select Edit Scopes Order from the list of scopes and click the Edit icon.

  4. Select the necessary severity level from the list and apply the changes.

    Changing inspection severity by scope

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

  1. In the Preferences dialog ⌃⌥S, go to Editor | Inspections and select the profile in which you want to make the changes.

  2. From the list of severity levels, select Edit severities.

  3. Select the severity for which you want to change the formatting and click Edit Settings | Colors & Fonts.

  4. Configure the new highlighting rules. Use the preview section at the bottom of the dialog.

    Changing error highlighting

You can also modify highlighting in the settings under Editor | Color Scheme | General.

Create a new severity level

  1. In the Preferences dialog ⌃⌥S, go to Editor | Inspections and select the profile in which you want to create a new severity level.

  2. Click any inspection and select Edit severities from the list of severity levels.

  3. In the Severities Editor dialog, click the Add button and name the new severity level.

  4. Configure the formatting and set a priority using the Up and Down buttons — the higher you put the severity on the list, the higher its priority.

  5. Click OK when finished.

    Creating a new severity

Last modified: 17 July 2020