Qodana 2023.2 Help

JetBrains IDEs

Starting from version 2022.3, you can use Qodana to inspect your codebase for problems and use the recommendations to eliminate them using JetBrains IDEs installed via JetBrains Toolbox App such as IntelliJ IDEA, PhpStorm, WebStorm, Rider, GoLand, PyCharm, and Rider.

Using the IDE, you can:

UI overview

Qodana functionality is available using the Tools | Qodana menu of your IDE.

The Qodana menu

You can also have access to Qodana using the Problems | Server-Side Analysis tool window of your IDE.

The Server-Side Analysis tool window

Run Qodana locally

You can configure and run Qodana locally using your IDE, and then forward inspection reports to Qodana Cloud for storage and analysis purposes.

  1. In your IDE, navigate to Tools | Qodana | Try Code Analysis with Qodana.

  2. In the Run Qodana dialog, click the Try locally button.

    First step of the Run Qodana dialog
  3. In the upper part of the Run Qodana dialog, configure the qodana.yaml file.

    Under the text field, configure the options to make Qodana:

    Configuring Qodana in the Run Qodana dialog

    Click Run for inspecting your code.

  4. In the Server-Side Analysis tool window, overview inspection results.

Configure Qodana for CI

You can add Qodana into CI pipelines using the configuration wizard.

  1. In your IDE, navigate to Tools | Qodana | Try Code Analysis with Qodana.

  2. In the Run Qodana dialog, click the Add to CI Pipeline button.

    First step of the Run Qodana dialog
  3. In the Run Qodana dialog, configure the qodana.yaml file.

    Second step of the CI/CD configuration in the Run Qodana dialog
  4. Select the CI solution you would like to configure Qodana for, and study the instructions.

    Third step of the CI/CD configuration in the Run Qodana dialog

Connect to Qodana Cloud

You can connect your local project to a specific Qodana Cloud project, get the latest Qodana report, and overview it using the IDE.

  1. In your IDE, navigate to Tools | Qodana | Log in to Qodana.

  2. In the Settings dialog, click Log in.

    Connecting to Qodana Cloud

    This will redirect you to the authentication page.

  3. Select the Qodana Cloud project to link your local project with.

    Linking the project to Qodana Cloud
  4. In the Server-Side Analysis tool window, overview inspection results.

Open a local report

You can open and study SARIF-formatted Qodana reports in your IDE.

  1. In your IDE, navigate to Tools | Qodana | Open Local Report.

  2. Select the SARIF-formatted report file you would like to open.

  3. In the Server-Side Analysis tool window, you can overview inspection results.

Qodana report overview

Using the Server-Side Analysis tool window of your IDE, you can view Qodana reports and navigate to the code fragments containing such problems.

Navigating to problems in the IDE

The left part of the Server-Side Analysis tool window contains several buttons.

Buttons in the Server-Side Analysis tool window

This table describes each button from top to bottom:

Button

Description

Close Report

Close the report that was previously opened

Refresh Report

Download the updated version of the report from Qodana Cloud. This requires that you first link your project with Qodana Cloud

Log in to Qodana / Logged in to Qodana

Log in Qodana Cloud, or log out. This action is a prerequisite for linking your project with Qodana Cloud-based reports

Link project with Cloud / Linked with Cloud

Link your project with a specific Qodana Cloud-based project, or unlink it. This requires that you first log in to Qodana Cloud

View Options

Filter out code issues by their severity and configure their sorting. When no grouping or sorting options are selected, the issues are listed in the order they appear in the file. You can also filter all issues by the baseline

Open Editor Preview

Open the preview pane to view the selected issue in its source context. This preview lets you can change the code and apply available quick-fixes

Expand All

Expand all nodes to see all issues in the expanded form

Collapse All

Collapse all nodes that were previously expanded

Show Qodana in Browser

Open the inspection report using your default browser

Other

Functionalities from the Tools | Qodana menu

Qodana log overview

In your IDE, navigate to Help | Collect Logs and Diagnostic Data. This will collect all necessary data and save them under a specific directory.

Last modified: 16 November 2023