Qodana 2023.3 Help

Quick-fix

Quick-fix lets you improve development performance through fixing codebase problems automatically.

This feature is available starting from version 2023.2 of Qodana and supported by the following linters and their trial versions:

How it works

You can choose between several quick-fix strategies mentioned in this table.

Quick-fix strategy

Description

NONE

The default strategy that requires no configuration and implies that no quick-fixes are applied to your project

CLEANUP

Automatic application of the minor and safe cleanup inspections that do not affect the project logic and behavior

APPLY

Qodana attempts to evaluate and fix all problems detected in the codebase.

This approach may lead to serious code modifications that can affect the project logic and behavior. These changes should be reviewed before submitting

You can apply quick-fix strategies using the following available options:

Run Qodana with the --fixes-strategy option invoked. The QODANA_TOKEN variable refers to the project token required by the Ultimate and Ultimate Plus linters.

docker run \ -v <source-directory>/:/data/project/ \ -e QODANA_TOKEN="<cloud-project-token>" \ jetbrains/qodana-<linter> \ --fixes-strategy <cleanup/apply>
qodana scan \ -e QODANA_TOKEN="<cloud-project-token>" \ <--apply-fixes/--cleanup>

You can use the fixesStrategy option in the qodana.yaml file:

fixesStrategy: cleanup/apply

Learn the GitHub Actions section for details.

Last modified: 29 February 2024