JetBrains Rider 2019.3 Help

Code Inspections in General

This topic lists all JetBrains Rider code inspections available in General.

You can toggle specific inspections or change their severity level on the Editor | Inspection Settings | Inspection Severity | Other Languages page of JetBrains Rider settings Ctrl+Alt+S.



Default Severity

TODO comment

Reports TODO comments in your code. The Format ofTODO comments is configurable via the Settings | Editor | TODO panel. Sincesyntax highlighting for TODO comments is already provided, it is expected that this will largelybe used in batch mode.

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|Code Style|Line separator, and the file you are editing uses '\r\n' as a line separator.

Problematic whitespace

Reports tabs used for indentation when the code style is configured to use only spaces. Reports spaces used for indentation whenthe code style is configured to use only tabs. Reports spaces used for indentation and tabs used for alignment when the codestyle is configured to use smart tabs.

Project Fingerprint

Collects files statistics (e.g. language, tree depth) to create project fingerprint

Line is longer than allowed by code style

Inspection warns you of lines which are longer than right margin parameter in Code Style settings.

Structural search inspection

This inspection allows to configure number of Structural Search/Structural Replace templates to be applied to the file you are editing.

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

Injected references

Checks references injected by IntelliLang plugin.

Error Error
Redundant suppression

Reports usages of

  • @SuppressWarning annotation, or

  • // noinspection line comment, or

  • /** noinspection */ JavaDoc comment

which can be safely removed because inspection they affect is no longer applicable in this 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
Syntax error

Allows you to see syntax errors in the results of batch code inspection.

Error Error
Duplicated code fragment

Reports duplicated blocks of code from the selected scope: the same file or the entire project. The inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments and compare them in a tool window.

The inspection options allow you to select the scope of the reported duplicated fragments, and set the initial size for the duplicated language constructs.

You can also configure the constructs that you want to anonymize in File | Settings | Editor | Duplicates.

Weak Warning Weak warning

Allows you to see problems reported by language annotators in the results of batch code inspection.

Error Error
Last modified: 24 February 2020