Quick start
The current version of Qodana (2022.3) 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 tab.
Install Qodana CLI on your machine using available options:
Install with Homebrew (recommended):
brew install jetbrains/utils/qodanaInstall with our installer:
curl -fsSL https://jb.gg/qodana-cli/install | bashInstall with Scoop:
scoop bucket add jetbrains https://github.com/JetBrains/scoop-utils scoop install qodanaInstall with Go:
go install github.com/JetBrains/qodana-cli@latestIn the project root directory, run this command:
qodana initThis will create the
qodana.yaml
file containing all necessary configuration options.In the project root directory, run this command to inspect your code:
qodana scan --show-report
This section assumes that you have the Docker application deployed on your machine.
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.
Run this command to analyze your codebase:
docker run --rm -it -p 8080:8080 \ -v <source-directory>/:/data/project/ \ jetbrains/qodana-<linter> --show-reportwith <source-directory> pointing to the root of your project.
Check inspection results in your browser at
http://localhost:8080
.
The detailed information about Qodana linters is available in the Linters section.