Analyze code formatting
You can use Qodana to analyze whether your code adheres to correct formatting. Currently, Qodana can analyze the IntelliJ IDEA, Eclipse, and EditorConfig code style schemes.
Follow these steps to configure formatting analysis.
In your IDE, configure the project code style scheme that you would like to employ, see the IntelliJ IDEA documentation as an example.
In the
.idea/codeStylesdirectory of your project, save thecodeStyleConfig.xmlfile containing the following configuration:<component name="ProjectCodeStyleConfiguration"> <state> <option name="USE_PER_PROJECT_SETTINGS" value="true" /> </state> </component>In the
qodana.yamlfile, enable theIncorrectFormattinginspection:include: - name: IncorrectFormatting
Once all configurations are complete, you can run Qodana.
23 May 2025