CLion 2019.3 Help

Inspection Severities

Change severity of 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. If this inspection is disabled, select the checkbox next to it.

  3. Select the desired severity from the context menu of the inspection or from the Severity selector on the right:
    severity selector

    Note that inspections, whose state is changed relative to the default values, and all their grouping nodes are highlighted with blue.

  4. Apply the changes. The modified inspection will now have the new severity level when this profile is used.

Change severity of an inspection for different scopes

  1. Choose the desired profile and inspection.

  2. Click the list In All Scopes, and select the scope you want to change inspection severity in.

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

  3. Click severity list for the selected scope and choose the appropriate severity level from the list:

    Configuring inspection severity for different scopes

Change the highlighting style for a specific severity level

  1. Do one of the following:

    • In the Settings/Preferences dialog Ctrl+Alt+S, select Editor | Colors & Fonts -> General, and then select the style corresponding to the desired severity level.

    • In the inspection settings, select the desired inspection and choose Edit severities from the Severity selector.

      Next, in the Severities Editor dialog that opens, select the desired severity level and click Editor | Colors & Fonts.

    Either way you will see the styles associated with this severity in the Color Scheme settings page.

  2. Configure the color and font styles as necessary and apply changes. The detected issues with the corresponding severity will now be highlighted in the editor with the modified style when the current profile is used.

Define a custom severity level

  1. In the inspection settings, select the desired inspection and choose Edit severities from the Severity selector.

  2. In the Severities Editor dialog that opens, click Add:

    Severity editor

  3. Type the name for the new severity in the New Highlight Severity dialog.

    New highlight severity

    The custom severity is added to the list of severities.

  4. Specify color and font settings for the new severity using the controls to the right of the list of severities.

  5. Use the Up Up and Down Down buttons to change the priority of the new severity.

  6. Apply the changes. The new severity level will now be available for all inspections within the current profile. You can assign it to specific inspections and get the corresponding code issues highlighted with the specified style in the editor.

    If necessary, you can remove the custom severity level later by selecting it in the Severities Editor dialog and clicking Remove.

    You cannot change priorities of the pre-defined severity levels, or remove them.

Last modified: 12 December 2019