You can extend Qodana using either existing plugins from repositories, or by developing your own plugins.
Plugins from repositories
This section explains how to inspect PHP code using the Qodana for PHP linter enhanced with the Php Inspections (EA Extended) plugin. You can repeat these steps for any relevant IDE plugin from JetBrains Marketplace or any custom repository.
Install and configure the plugin
The easiest method for installing a plugin is using the
plugin option of the
<plugin-id> denotes the Plugin ID from JetBrains Marketplace. For example, for Grazie Professional the Plugin ID value will be
com.intellij.grazie.pro. To find the ID of a specific plugin, on the plugin page of JetBrains Marketplace click the tab, and then navigate to the section.
Alternatively, you need to prepare the following files:
The code of the plugin
The configuration of the plugin
The inspection profile containing the configuration of the plugin inspections
Here is how you can obtain these files:
Install the plugin using any of the installation method available. For any installation method chosen, you need to know the path to the plugin file after it has been installed. If you install the plugin using the Settings | Plugins dialog of your IDE, see the Plugins directory section for reference. If you download the
PhpInspectionsEA.jarplugin file from JetBrains Marketplace, save it to a directory accessible by Qodana.
ea_extended.xmlplugin configuration file is located in the
optionssubdirectory of the IDE config directory. You can save this file to any directory accessible by Qodana.
Navigate to the Inspections dialog of your IDE, expand the entry, check the inspections you would like to employ, and export the inspection profile in the project root folder under the
In the project root directory, create the
qodana.yaml file and specify the path to the profile location in it:
Use this snippet for running Qodana locally:
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.