Qodana 2026.2 Help

List of CLI options

This section explains how you can configure Qodana linters using configuration of the tools that will be used for running like Docker, GitHub Actions, GitLab CI/CD, and other tools.

In several cases, settings mentioned in this section are also available for configuring via the qodana.yaml file, which is also mentioned in this section.

Types of options

You can configure Qodana using three types of options as shown below.

Option type

Example

Requires the equal sign (=) between the option name and its argument

--property=idea.log.config.file=info.xml

Requires the space character ( ) between the option name and its argument

--baseline /path/to/sarif/file

Requires no argument

--apply-fixes

Here is the example command that invokes all these options:

docker run \ -v $(pwd):/data/project/ \ -e QODANA_TOKEN="<cloud-project-token>" \ <image-name> \ --property=idea.log.config.file=info.xml \ --baseline <baseline-path> \ --apply-fixes
qodana scan \ -e QODANA_TOKEN="<cloud-project-token>" \ --property=idea.log.config.file=info.xml \ --baseline <baseline-path> \ --apply-fixes
name: Qodana on: workflow_dispatch: pull_request: push: branches: # Specify your branches here - main # The 'main' branch - master # The 'master' branch - 'releases/*' # The release branches jobs: qodana: runs-on: ubuntu-latest permissions: contents: write pull-requests: write checks: write steps: - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit fetch-depth: 0 # a full history is required for pull request analysis - name: 'Qodana Scan' uses: JetBrains/qodana-action@v2026.2 with: args: | --property=idea.log.config.file=info.xml --baseline <baseline-path> --apply-fixes env: QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
pipeline { environment { QODANA_TOKEN=credentials('qodana-token') } agent { docker { args ''' -v "${WORKSPACE}":/data/project --entrypoint="" ''' image 'jetbrains/qodana-<image>' } } stages { stage('Qodana') { steps { sh ''' qodana \ --property=idea.log.config.file=info.xml \ --baseline <baseline-path> \ --apply-fixes ''' } } } }
include: - component: $CI_SERVER_FQDN/qodana/qodana/qodana-gitlab-ci@v2026.1 inputs: args: | --property=idea.log.config.file=info.xml --baseline <baseline-path> --apply-fixes --image <image>

In the runner configuration, find the Additional Qodana arguments field and specify the path to the plugin file:

--property=idea.log.config.file=info.xml --baseline <baseline-path> --apply-fixes

Configure projects

Option

Description

The default value

--config <string>

Set a custom configuration file instead of qodana.yaml. Use a path relative to the project directory

None

-f, --force

Force initialization, overwrite the existing valid qodana.yaml file

None

-i, --project-dir <string>

Specify the root directory of your project

.

You can invoke these options in Qodana CLI using the qodana init <options> command.

Analyze projects

Option

Description

--image <string>

In place of <string>, specify the Qodana Docker image that you would like to employ:

Docker image

Description

jetbrains/qodana-jvm-community:2026.2

Qodana Community for JVM

jetbrains/qodana-jvm:2026.2

Qodana for JVM

jetbrains/qodana-jvm-android:2026.2

Qodana Community for Android

jetbrains/qodana-android:2026.2

Qodana for Android

jetbrains/qodana-php:2026.2

Qodana for PHP

jetbrains/qodana-python:2026.2

Qodana for Python

jetbrains/qodana-python-community:2026.2

Qodana Community for Python

jetbrains/qodana-js:2026.2

Qodana for JS

jetbrains/qodana-go:2026.2

Qodana for Go

jetbrains/qodana-dotnet:2026.2

Qodana for .NET

jetbrains/qodana-cdnet:2026.2

Qodana Community for .NET

jetbrains/qodana-cpp:2026.2

Qodana for C/C++

jetbrains/qodana-clang:2026.2

Qodana Community for C/C++

jetbrains/qodana-ruby:2026.2-eap

Qodana for Ruby

Also, you can use any Docker image that has Qodana.

-l, --linter <string>

In place of <string>, specify the linter that you would like to employ:

Linter name

Description

qodana-jvm-community

Qodana Community for JVM

qodana-jvm

Qodana for JVM

qodana-jvm-android

Qodana Community for Android

qodana-android

Qodana for Android

qodana-php

Qodana for PHP

qodana-python

Qodana for Python

qodana-python-community

Qodana Community for Python

qodana-js

Qodana for JS

qodana-go

Qodana for Go

qodana-dotnet

Qodana for .NET

qodana-cdnet

Qodana Community for .NET

qodana-cpp

Qodana for C/C++

qodana-clang

Qodana Community for C/C++

qodana-ruby

Qodana for Ruby

--within-docker <true|false>

Define whether analysis will be performed within a Docker container.

If set to true, Qodana will employ a respective Docker image. The image for container creation will be chosen in an automated way based on the --image value. For example, the jetbrains/qodana-jvm image will be chosen in case of --linter qodana-jvm.

If set to false, Qodana will analyze your project in native mode using the current environment.

The default value is defined dynamically based on the analysis of the current environment and project.

Native mode is currently available for the following Qodana linters:

Linter name

Description

qodana-jvm

Qodana for JVM

qodana-jvm-community

Qodana Community for JVM

qodana-php

Qodana for PHP

qodana-js

Qodana for JS

qodana-dotnet

Qodana for .NET

qodana-go

Qodana for Go

qodana-python

Qodana for Python

qodana-python-community

Qodana Community for Python

-i, --project-dir <string>

Root directory of the analyzed project. The default value is .

--repository-root string <string>

Path to the root of the Git repository. This directory must be the same as --project-dir or contain the project directory inside it.

-o, --results-dir <string>

Override the directory for saving Qodana analysis reports. The default value is <userCacheDir>/JetBrains/Qodana/<linter>/results

--cache-dir <string>

Override the cache directory. The default value is <userCacheDir>/JetBrains/Qodana/<linter>/cache

-r, --report-dir <string>

Override the directory for saving Qodana HTML reports. The default value is <userCacheDir>/JetBrains/<linter>/results/report

--print-problems

Print in the CLI output all problems found by Qodana

--code-climate

Generate a SARIF-formatted Code Climate report supported by GitLab CI/CD. The report will be saved in the directory specified by the --results-dir option. By default, this option is enabled if GitLab CI/CD is running

--bitbucket-insights

Generate a Code Insights report supported by Bitbucket Cloud. By default, this option is enabled if Qodana is being run in the Bitbucket Pipelines

--clear-cache

Clear the local Qodana cache before running analyses

-w, --show-report

Serve an HTML report on the port specified by the --port option

--port <int>

Port to serve the report. The default value is 8080. This option is deprecated, use the --show-report-port option instead

--show-report-port <int>

Port to serve the report

--config <string>

Set a custom configuration file instead of qodana.yaml. Use a path relative to the project root directory

-a, --analysis-id <string>

Unique report identifier (GUID) to be used by Qodana Cloud. The default value is 2c72b6e8-f09d-472a-bb86-8a7d8e374ed1

-b, --baseline <string>

Provide the path to an existing SARIF report to be used in the baseline state calculation

--baseline-include-absent

Include baseline problems that are marked absent in the output report

--full-history [--commit <commit-hash>]

Go through the full commit history and run the analysis on each commit. If combined with --commit, the analysis will be started from the given commit

--commit <commit-hash> [--full-history]

Reset Git and run analysis only for the files modified since the given commit. If combined with the --full-history option, full history analysis will be started from the given commit

--fail-threshold <string>

Set the number of problems that will serve as a quality gate. Once the quality gate threshold is reached, the analysis will be terminated with a non-zero exit code

--disable-sanity

Skip the inspections configured by the qodana.sanity inspection profile

-d, --source-directory <string>

Specify the directory inside the project-dir directory that must be analyzed. If not specified, the whole project will be analyzed

--repository-root <string>

Specify the VCS root directory for your project. This option is required for Git-related operations

--only-directory <string>

Specify the directory inside the project-dir directory that must be analyzed. If not specified, the whole project will be analyzed

Files and directories contained in the outside directory like .git and build.gradle are used by Qodana while inspecting code

-n, --profile-name <string>

Specify the profile name

-p, --profile-path <string>

Specify the path to the profile file

--run-promo <true|false>

Set this option to true to use the promo inspections; set to false otherwise. The default value is true if Qodana is executed using the default profile

--script <string>

Override the run scenario of Qodana. Currently, the following run scenarios are available:

Scenario name

Description

default

The default Qodana scenario, enabled by default

php-migration

PHP version migration scenario

local-changes

Analyze only uncommitted changes. You can see the Incremental analysis section to learn more about incremental analysis

--coverage-dir <string>

Specify the directory that contains code coverage data for analysis

--apply-fixes

Apply all available Quick-Fix strategies including cleanup, see the Quick-Fix section for details

--cleanup

Run the CLEANUP Quick-Fix strategy, see the Quick-Fix for details

--property <stringArray>

Set a JVM property to be used while running Qodana. Use the --property property.name=value1,value2,...,valueN notation

-s, --save-report

Generate an HTML report. This option is enabled by default

--timeout int

Set Qodana analysis time limit in milliseconds. Once reached, the analysis will be terminated and the process will exit with the timeout-exit-code code. The default setting is 1

--timeout-exit-code <int>

Override the default timeout setting --timeout option. The default value set by the timeout option is 1

--diff-start <string>

Set the hash of the commit that will act as a base for comparison in a change analysis

--diff-end <string>

Set the hash of the commit that will act as an end in a change analysis. This lets you analyze only files changed between the --diff-start and --diff-end commits

--reverse

Override the default run scenario by launching incremental analysis in reverse order. This lets you skip analysis of the main codebase if the incremental analysis finds no issues.

--no-statistics

Disable sending anonymous statistics

--compile-commands <string>

Specify the path to the compile_commands.json file. The default value is ./build/compile_commands.json"

--clang-args <string>

Set additional arguments, see the C / C++ section for details

--solution <string>

Set a relative path to a solution file, see the .NET section for details

--project <string>

Set a relative path to a project file, see the .NET section for details

--configuration <string>

Specify the build configuration, see the .NET section for details

--platform <string>

Specify the build platform, see the .NET section for details

--no-build

Skip project building before analyses, see the .NET section for details

-e, --env <stringArray>

Define environment variables for the Qodana container, multiple variables can be specified. For security reasons, Qodana CLI does not read environment variables from the host operating system, so all variables required by Qodana should be specified explicitly.

-v, --volume <stringArray>

Define additional volumes for the Qodana container, multiple volumes can be specified. For example, qodana scan --volume $(pwd)/.qodana/results:/data/results/

-u, --user <string>

User to run Qodana container as. Please specify the user ID – $UID or the user ID and group ID $(id -u):$(id -g). Use root to run as the root user. By default, it is set to the current user

--skip-pull

Skip pulling the latest Qodana container

You can invoke these options in Qodana CLI using the qodana scan <options> command.

Send analysis reports to Qodana Cloud

Option

Description

-a, --analysis-id <string>

The unique report identifier (GUID) to be used by Qodana Cloud. The default value is f9d8a78f-f922-452b-8062-a64afc352537

--config <string>

Set a custom configuration file instead of qodana.yaml. Use a path relative to the project root directory

-l, --linter <string>

Override the linter which report will be used for sending to Qodana Cloud

-i, --project-dir <string>

Root directory of the project which report will be sent to Qodana Cloud. The default value is .

-r, --report-dir <string>

Override the directory for saving Qodana HTML reports. The default value is <userCacheDir>/JetBrains/<linter>/results/report

-o, --results-dir <string>

Override the directory that will be used for sending a Qodana report from. The default value is <userCacheDir>/JetBrains/<linter>/results

You can invoke these options in Qodana CLI using the qodana send <options> command.

View reports

Option

Description

--config <string>

Set a custom configuration file instead of qodana.yaml. Use a path relative to the project root directory

-d, --dir-only

Open the report directory only without serving it

-l, --linter <string>

Override the linter which report should be viewed

-p, --port <int>

Specify the port to serve a report. The default value is 8080

-i, --project-dir <string>

Root directory of the project which report should be viewed. The default value is .

-r, --report-dir <string>

Override the directory to save a Qodana HTML report. This is the directory that contains the index.html file. The default value is <userCacheDir>/JetBrains/<linter>/results/report

-o, --results-dir <string>

Override the directory for saving analysis reports. The default value is <userCacheDir>/JetBrains/<linter>/results

You can invoke these options in Qodana CLI using the qodana show <options> command.

View SARIF-formatted files

Option

Description

Default setting

-f, --sarif-file <string>

Path to the SARIF-formatted file

./qodana.sarif.json

You can invoke these options in Qodana CLI using the qodana view <options> command.

Count contributors

To collect information about contributors to your project, you can run Qodana using the following options.

Option

Description

Default setting

-d, --days <int>

The number of days in the past that should be used for calculating the number of active contributors

90

-o, --output string

The output format. Available values are tabular and json

tabular

-i, --project-dir <stringArray>

The Directory of the project that can be specified multiple times to analyze multiple projects

.

You can invoke these options in Qodana CLI using the qodana contributors <options> command.

View project statistics

You can use these options to view information about your project, such as languages and lines of code.

Option

Description

-o, --output <string>

The output format that accepts the tabular, wide, json, csv, csv-stream, cloc-yaml, html, html-table, sql, sql-insert, openmetrics values. The default setting is tabular

-i, --project-dir <stringArray>

The project directory. This option can be specified multiple times to analyze multiple projects. If not specified, the current directory will be used

You can invoke these options in Qodana CLI using the qodana cloc <options> command.

Pull a Qodana image

Using these options, you can pull the Qodana linter that you would like to employ.

Option

Description

--config <string>

Set a custom configuration file instead of qodana.yaml. Use a path relative to the project root directory

--image <string>

Specify the image that you would like to pull

-l, --linter <string>

Specify the linter that you would like to pull

-i, --project-dir <string>

The root directory of the analyzed project. If not specified, the current directory will be used

You can invoke these options in Qodana CLI using the qodana pull <options> command. Qodana CLI takes information about the linter using either the qodana.yaml file configuration or the --linter option.

Generate an autocompletion script

Using these options, you can generate an autocompletion script for a specific shell.

Command

Description

bash

Generate the autocompletion script for bash

fish

Generate the autocompletion script for fish

powershell

Generate the autocompletion script for PowerShell

zsh

Generate the autocompletion script for zsh

You can invoke these options in Qodana CLI using the qodana completion <options> command.

Configure update checking and log levels

Option

Description

--disable-update-checks

Disable checking and notification about new versions of Qodana CLI

--log-level <string>

Change log level in the output of Qodana CLI. For example, you can set --log-level debug to receive the detailed log reports. The default setting is error

25 August 2026