Code Inspections in General
This topic lists all GoLand code inspections available in General.
You can toggle specific inspections or change their severity level on the Editor | Inspections page of the Settings/Preferences Ctrl+Alt+S.
Inspection | Description | Default Severity |
---|---|---|
Annotator | Allows you to see problems reported by language annotators in the results of batch code inspection. | Error |
Inconsistent line separators | This inspection detects files with line separators different from the project default. E.g. you set the line separator to "\n" in the Settings|Editor|Code Style|Line separator, and the file you are editing uses "\r\n" as a line separator. Also warns about mixed line separators in the file. | Disabled |
Injected references | Checks references injected by IntelliLang plugin. | Error |
Line is longer than allowed by code style | Inspection warns you of lines which are longer than right margin parameter in Code Style settings. | Disabled |
Problematic whitespace | Reports tabs used for indentation when the code style is configured to use only spaces. Reports spaces used for indentation when the code style is configured to use only tabs. Reports spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs. | Disabled |
Redundant suppression | Reports usages of
For example: C { // symbol is already private, // but annotation is still around @SuppressWarnings({"WeakerAccess"}) CONST = ; f() { CONST = ; }
} | Warning |
Syntax error | Allows you to see syntax errors in the results of batch code inspection. | Error |
TODO comment | Reports TODO comments in your code. The Format of TODO comments is configurable via the Settings | Editor | TODO panel. Since syntax highlighting for TODO comments is already provided, it is expected that this will largely be used in batch mode. | Disabled |