AI CodeFix

AI CodeFix can be enabled at the project level by an instance administrator. AI features are available in SonarQube Cloud Team and Enterprise plans.

Sonar’s AI CodeFix uses a large language model (LLM) to automatically generate AI-driven code fixes for the issues discovered by SonarQube Cloud AI CodeFix must be enabled by an Instance Admin and is defined for All projects or for Only selected projects.

See the Enable AI CodeFix page for the full details.

Getting AI-generated fix suggestions

SonarQube Cloud’s AI CodeFix is a feature that uses Anthropic's Claude Sonnet 4 (recommended) or OpenAI's GPT-4o to suggest fixes for a select set of rules in Java, JavaScript, TypeScript, Python, C#, and C++. To learn more about which rules are eligible for AI CodeFix, check the list of Rules covered with AI CodeFix.

When an Instance Admin enables AI CodeFix for your project, you can get an AI-generated fix suggestion for eligible issues. See the Sonar AI CodeFix terms for details about the terms of access.

If you’re using connected mode with SonarQube for VS Code or SonarQube for IntelliJ, it's possible to get AI-generated fix suggestions directly in your IDE. See the relevant SonarQube for IDE pages to see how it works:

If you're not using connected mode with SonarQube for IDE, see the Getting AI-generated fix suggestions article for alternative instructions. Then use the Fixing issues feature to apply the fix.

Last updated

Was this helpful?