CLion 2020.2 Help

List of general inspections

Settings / Preferences | Editor | Inspections - General

InspectionDescriptionDefault Severity
Annotator

Shows the problems reported by the language annotators in the Inspect Code results.

Error Error
Duplicated code fragment

Reports duplicated blocks of code from the selected scope.

This inspection provides quick-fixes to help you to set the size of the detected duplicates, navigate to the repetitive fragments, and compare them in a tool window. You can also configure the constructs that you want to anonymize in File | Settings | Editor | Duplicates.

Weak Warning Weak warning
Global unused analysis

Detects unused classes, global declarations, instance variables, properties, methods, and macro inspections.

Warning Warning
Inconsistent line separators

Detects the files with line separators different from the project default: for example, when you set the line separator to "\n" in the Settings / Preferences | Code Style| Line separator, while the file you are editing uses '\r\n' as a line separator.

the Disabled checkbox Disabled
Injected references

Checks the injected language references.

Error Error
Line is longer than allowed by code style

Warns when a line is wider than the Hard wrap at value set in Settings / Preferences | Editor | Code Style.

the Disabled checkbox Disabled
Problematic whitespace

Reports tabs used for indentation when the code style is configured to use only spaces, or vice versa. Also reports spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs.

the Disabled checkbox Disabled
Redundant suppression

Reports the usages of @SuppressWarning annotation, // noinspection line comment, or /** noinspection */ JavaDoc comment, which can be safely removed because the inspection they affect is no longer applicable in the context. For example:

public class C { // symbol is already private, // but annotation is still around @SuppressWarnings({"WeakerAccess"}) private boolean CONST = true; void f() { CONST = false; } }

Warning Warning
Structural search inspection

Allows configuring the number of Structural Search/Structural Replace templates to be applied to the file you are editing.

All the matches are highlighted with the template name you have configured. If you configure the Structural Replace pattern, the corresponding replace appears as a quick-fix.

the Disabled checkbox Disabled
Syntax error

Shows syntax errors in the Inspect Code results.

Error Error
TODO comment

Reports the TODO comments in your code. You can configure the format of TODO-s in Settings / Preferences | Editor | TODO panel.

Since TODO comments are highlighted in the editor by default, this inspection is intended for the Inspect Code mode.

the Disabled checkbox Disabled
Last modified: 17 July 2020