Qodana 2023.1 Help

Quick start

The current version of Qodana (2023.1) provides linters that let you analyze Java, Kotlin, PHP, Python, JavaScript, TypeScript, .NET, and Golang projects. In addition, you can inspect your code for duplicate functions and incompatible licenses used in your project.

Analyze a project locally

Qodana provides two options for local analysis of your code. Qodana CLI is the easiest option to start. Alternatively, you can use the Docker command from the Docker image tab.

  1. Install Qodana CLI on your machine using available options:

    Install with Homebrew (recommended):

    brew install jetbrains/utils/qodana

    Install with our installer:

    curl -fsSL https://jb.gg/qodana-cli/install | bash

    Install with Scoop:

    scoop bucket add jetbrains https://github.com/JetBrains/scoop-utils scoop install qodana

    Install with Go:

    go install github.com/JetBrains/qodana-cli@latest
  2. In the project root directory, run this command:

    qodana init

    This will create the qodana.yaml file containing all necessary configuration options.

  3. In the project root directory, run this command to inspect your code:

    qodana scan --show-report

Depending on your tasks, you can configure Qodana as explained on the Configure Qodana page.

This section assumes that you have the Docker application deployed on your machine.

  1. Pull the image from Docker Hub (only necessary to get the latest version):

    docker pull <image>

    Here, image denotes the Docker image name of a Qodana linter from this table:

    Image name

    Application

    jetbrains/qodana-jvm

    Java and Kotlin for Server Side projects, based on IntelliJ IDEA Ultimate.

    jetbrains/qodana-jvm-community

    Java and Kotlin for Server Side projects, based on IntelliJ IDEA Community.

    jetbrains/qodana-jvm-android

    Java and Kotlin for Server Side projects, based on IntelliJ IDEA with the Android support.

    jetbrains/qodana-php

    PHP projects, based on PhpStorm.

    jetbrains/qodana-python

    Python projects, based on PyCharm Professional.

    jetbrains/qodana-js

    JavaScript and TypeScript projects, based on WebStorm.

    jetbrains/qodana-go

    Golang projects, based on Goland.

    jetbrains/qodana-dotnet

    .NET projects, based on Rider.

  2. Run this command to analyze your codebase:

    docker run --rm -it -p 8080:8080 \ -v <source-directory>/:/data/project/ \ jetbrains/qodana-<linter> --show-report

    with <source-directory> pointing to the root of your project.

  3. Check inspection results in your browser at http://localhost:8080.

Depending on your tasks, you can configure Qodana as explained on the Configure Qodana page.

Next steps

Last modified: 12 June 2023