Start FreeLog in
SonarQube Cloud | AI capabilities | AI CodeFix

AI CodeFix

On this page

AI features are only available in SonarQube Cloud Team and Enterprise plans.

Enabling AI-generated fix suggestions

SonarQube Cloud's AI CodeFix is an Early Access feature that uses Open AI’s GPT-4o (recommended) or Anthropic's Claude 3.5 or 3.7 Sonnet to suggest fixes for a select set of rules in Java, JavaScript, TypeScript, Python, C#, and C++. See the Sonar AI CodeFix terms for details about the terms of access. 

Organization Admin, you can activate or deactivate AI-generated fix suggestions for your organization at the global and project levels; see the Enabling AI CodeFix page for the full details.

Sharing your code with Sonar

If you use Sonar's AI CodeFix LLM, the affected code snippet will be sent by the AI CodeFix service to the selected LLM. Service agreements with Sonar’s LLMs prevent your code from being used to train those models. 

For details about terms and conditions, please refer to the AI CodeFix terms in our Legal Documentation.

Getting AI-generated fix suggestions

Once AI CodeFix is enabled, users will be able to select Generate AI Fix on eligible issues and copy/paste the fix into their IDE with the Open in IDE feature when using connected mode. If your Engineers are using SonarQube for IntelliJ, AI CodeFix is available in the IDE and follows the settings you define in SonarQube Cloud.

To use AI CodeFix in SonarQube, please see the article on Getting AI-generated fix suggestions.

AI Code Assurance

SonarQube Server recognizes that AI-generated code should be monitored with additional quality standards and offers administrators a series of tools described on the AI standards page. The feature includes labels to mark projects with AI-generated code, custom quality gates that help protect your projects, and a set of external badges to monitor projects containing AI code.

If you’ve already set up AI Code Assurance and are ready to use the badges, it works just like any other. For instructions, please see the Using a project badge article. You do not need to enable the AI CodeFix feature to use AI Code Assurance. 


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