AI CodeFix
SonarQube for IntelliJ helps to integrate AI in your IDE when it connects with your Cloud or Server instance to get AI-generated fix suggestions for issues found during your analysis.
AI features are available when running in Connected mode with SonarQube Server Enterprise and Data Center editions, and with SonarQube Cloud. Check the Subscription plans page more information.
AI CodeFix in your IDE
AI CodeFix is a feature that generates AI-generated fix suggestions in (SonarQube Server, Cloud) and SonarQube for IntelliJ. It must be activated by a SonarQube Server or Cloud administrator. See the server documentation to enable AI CodeFix:
Enabling AI CodeFix in SonarQube Server
Enable AI CodeFix in SonarQube Cloud
About AI CodeFix
Running SonarQube for IntelliJ in connected mode with SonarQube Server 2025.3+ or SonarQube Cloud is required to get AI-generated fix suggestions in your IDE. See the Connection setup instructions to learn how to set up connected mode.
The suggestions are generated using the LLM selected when enabling the feature on the server. The details about how AI CodeFix works is available in the server documentation, at the links given above.
Getting AI-generated fix suggestions
With AI-CodeFix enabled in SonarQube Cloud, issues eligible for an AI-generated fix are identifiable by the icon in SonarQube for IDE. You may need to restart your IDE if the feature was recently enabled in SonarQube Cloud and the server has not yet synced with SonarQube for IntelliJ.
To generate a fix suggestion:
Select an eligible issue in your IDE and open the Rule tab; the
AI CodeFix tab will be available in the Rule description.
Select
Generate Fix.
An AI CodeFix snippet, or series of snippets if your issue is an injection vulnerability or something like a duplicated string that requires multiple snippets, will be generated and displayed with a diff view of the fix suggestion. See the Injection vulnerabilities page for more information about those issue types.
Select Apply to accept the suggestion.

It’s also possible to use the Open in IDE button from SonarQube Cloud to navigate to your issue in the code editor. See the article on Opening issues in the IDE for more information.
Rules covered with AI CodeFix
Below you’ll find a list of Sonar Rules that are eligible for use with our AI CodeFix feature. We’ve tested each of these rules in the supported AI models and given them a confidence score to ensure they can effectively help you resolve issues. Once a rule passes our certification, it’s added to the AI CodeFix service and becomes available to you. We’re constantly working to expand this list by evaluating more rules and enhancing our AI capabilities.
Each collapsible holds a list of rules for the listed language. You will find instructions inside on how to find the detailed rule description on the Sonar Rules website.
Last updated
Was this helpful?