DataGrip 2020.1 Help

Code inspections

In DataGrip, there is a set of code inspections that detect and correct anomalous code in your project before you compile it. The IDE can find and highlight various problems, locate dead code, find probable bugs, spelling problems, and improve the overall code structure.

Inspections can scan your code in all project files, or only in specific scopes (for example, only in production code, or in modified files).

Every inspection has a severity level — the extent to which a problem can affect your code. Severities are highlighted differently in the editor so that you can quickly distinguish between critical problems and less important things. DataGrip comes with a set of predefined severity levels and enables you to create your own.

Inspections and their settings are grouped in profiles. Each profile contains the information on the enabled inspections, a scope of files that they analyze, and their severity levels.

Access all available inspections and their settings

  • In the Settings/Preferences dialog Ctrl+Alt+S, go to Editor | Inspections.

    You can also click the Hector icon Ctrl+Alt+Shift+H in the status bar (bottom right-hand corner of the editor), and click Configure inspections.

    The list of inspections and their settings

Use the Filter icon to filter the inspections list. For example, you can filter inspections by severity or by language.

Examples of code inspections

To see the list of available inspections, open settings Ctrl+Alt+S and navigate to Editor | Inspections.

An unused subquery item

Detects an unused item in the subquery (for example, a field).

Unused subquery item

DELETE or UPDATE statements without the WHERE clause

If you forgot to put the WHERE clause in DELETE and UPDATE statements, DataGrip displays a notification to remind you about that. If you omitted the WHERE clause intentionally, you can execute current statements as you planned.

Notification when you run DELETE and UPDATE without WHERE
Last modified: 16 July 2020