Start Free
SonarQube Community Build | Project administration | Setting up 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 Understanding 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.

By default, your project applies the baseline for new code (global-level new code definition). This means it consistently uses the baseline for new code. Consequently, any modifications to the baseline will automatically be applied to your project. You can apply a specific new code definition for your project instead.

See Configuring the new code calculation for your project.

Step 3: Set up the analysis

You can now set up your main branch analysis in SonarQube Community Build. See Project analysis setup.

To learn how to set up analysis in your IDE and with SonarQube Community Build, refer to the following links: SonarQube for IntelliJ, Visual Studio, VS Code, Eclipse.


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