Qodana 2022.1 Help


You can extend Qodana inspection functionality using either plugins from JetBrains Marketplace or your own plugins.

Plugins from JetBrains Marketplace

JetBrains Marketplace provides plugins for inspecting code in the IDE. These plugins can be used to extend the Qodana inspection functionality.

This section explains how to inspect PHP code using the Php Inspections (EA Extended) plugin combined with the Qodana for PHP linter. All actions taken in the IDE are explained for PhpStorm in the procedure below. You can reproduce these steps for any plugin from JetBrains Marketplace you would like to extend Qodana with.

  1. Using the Settings | Plugins dialog, install and enable the plugin.

  2. Using Settings | Editor | Inspections, configure the inspections you would like to use.

  3. Export the profile containing the enabled plugin inspections as described on the Configure profiles page.

In the project root directory, create the qodana.yaml file and specify the path to the profile location in it:

profile: path: path/to/the/profile/file

This is the snippet for running Qodana locally using the plugin:

docker run --rm -p 8080:8080 \ -v <project-directory>:/data/project/ \ -v <report-directory>:/data/results/ \ -v <package-file>:/opt/idea/plugins/<package-file> \ -v <additional-config>:/root/.config/idea/options/<additional-config> \ jetbrains/qodana-php --show-report

Here, <package-file> specifies the full path to the plugin package location including the full package filename. The <additional-config> line denotes the full path to the XML-formatted file containing additional plugin configuration.

Custom plugins

To learn how to develop plugins, you can study the Creating Your First Plugin page of the IntelliJ Platform Plugin SDK documentation portal. Besides that, each plugin should perform inspections and produce inspection results as described in the Inspections section of the documentation portal.

Last modified: 20 May 2022