AI settings
On this page
Marking a project as containing AI-generated code
Anyone with Project Admin permissions can mark any project with an AI Code Assurance badge to indicate that it contains AI-generated code. To do this, go to Your project > Administration > AI-generated code and select Contains AI-Generated Code.
When you select Lock Quality Gate and Save to save your setting:
- The Sonar way quality gate is enforced on the project.
- If the project already uses the Sonar way Quality Qate, activating the setting will lock the project’s quality gate.
- If the project does not use the Sonar way quality gate, activating this setting will change the project’s quality gate to Sonar way and lock it.
Locking the Sonar way quality gate ensures that the AI-generated code is clean by enforcing high-quality standards.
- The project will have the AI Code Assurance badge:
- An AI Code Assurance badge is displayed next to the project in the SonarQube Cloud UI.
Next, see the Using a project badge article to learn about publishing SonarQube Cloud badges to promote your project’s health on your web pages. You do not need to enable the AI CodeFix feature to use the AI Code Assurance badge.
If you want to use the AI CodeFix feature to have SonarQube Cloud generate a fix suggestion using AI, check with an Organization Admin about enabling AI-generated fix suggestions on your Organization.
Related pages
Was this page helpful?