Start Free
10.7 | User guide | Managing issues | Fixing issues

Fixing your code issues

On this page

Depending on the issue, you may get fix suggestions:

  • In the How can I fix it? tab of the issue's detail view.
  • From the Enterprise edition, generated through AI: see Getting AI-generated fix suggestions below.

Opening issues in your IDE

To speed up the time it takes to find and fix the issue, you can open the issue in your IDE provided the Connected Mode has been properly set up in order to connect SonarLint with SonarQube. 

To open an issue in your IDE:

  1. Retrieve the issue and open its detail view. 
  2. In the Where is the issue? tab, select Open in IDE

Getting AI-generated fix suggestions

This feature is available in Early Access, in Enterprise Edition and above.

If AI-generated fix suggestions are activated in your SonarQube instance, you can generate fix suggestions for the issues detected in your projects. The suggestions are generated using OpenAI's GPT-4. 

To generate a fix suggestion: 

  1. Retrieve the issue and open its detail view. 
  2. Go to the Where is the Issue or the Code Fix tab and click the Generate Fix button. 

You can then copy the generated fix suggestion to your IDE:

  • manually, by copying and pasting the suggestion into your IDE.
  • using the Code Fix > View Fix in IDE button if you use Connected Mode. This feature is available with SonarLint for VS Code, IntelliJ, and Eclipse.

Note that for some issues, AI-generated fix suggestions are not available.


Was this page helpful?

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

Creative Commons License