Start FreeLog in
SonarQube Cloud | Managing your project | Setting up project analysis | Clean as You Code

Setting up Clean as You Code for your project

On this page

As a project administrator, you set up Clean as You Code in three steps: 

Step 1: Set the quality standard for your project

The project's quality standards include:

  • Quality gates
    Quality gates enforce a quality policy for the results of code review and analysis in your organization by answering one question: is my project ready for release?
    For more information, see Introduction to quality gates.
  • Quality profiles
    Quality profiles define the set of rules to be applied during code analysis and review. 
    For more information, see Quality profiles.

The default quality gate and quality profiles defined by your Quality Standard administrator apply by default to your project. To change them, see:

Step 2: Set a new code definition for your project

With the Clean as You Code approach, focus is set on new code. New code is code that you've recently added or modified. The new code definition tells SonarQube which part of the code is considered new during analysis. For more information, see About new code.

When your project is created (whatever the creation method), the new code definition set at the organization level (if any) is applied to your project by default. You can select another new code definition for your project.

See Configuring the new code calculation for your project.

Step 3: Set up the analysis

To learn how to set up analysis in your IDE and with SonarQube Cloud, refer to the following links: 


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