IntelliJ | Using SonarQube for IDE | AI capabilities

AI capabilities in your IDE

On this page

AI features are only available when running in connected mode with SonarQube Cloud Team and Enterprise plans.

AI CodeFix in your IDE

AI CodeFix is an Early Access feature that generates AI-generated fix suggestions in SonarQube Cloud and SonarQube for IntelliJ. It must be activated by an Organization Admin in SonarQube Cloud. See Enabling AI-generated fix suggestions in the SonarQube Cloud documentation for more details.

About AI CodeFix

Running SonarQube for IntelliJ in connected mode with SonarQube Cloud is required to get AI-generated fix suggestions in your IDE. See the Connected mode setup page for details.

The suggestions are generated using the LLM selected when enabling the feature in SonarQube Cloud. Please see the enabled Enabling AI-generated fix suggestions instructions for more details. 

Getting AI-generated fix suggestions

With AI-CodeFix enabled in SonarQube Cloud, issues eligible for an AI-generated fix are identifiable by the $ai-icon-sparkle 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-icon-sparkleAI CodeFix tab will be available in the Rule description.
  • Select $ai-icon-sparkleGenerate 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.
  • Select Apply to accept the suggestion.
Issues that are eligible for AI-generated fix suggestions (the AI CodeFix feature) are highlighted by the star icon.

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.


Was this page helpful?

© 2008-2025 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License