Interview Prep/CI/CD/Testing and Quality Gates

What does SonarQube's "Clean as You Code" and new code period mean?

AdvancedConceptTesting and Quality Gates
Answer

Instead of demanding a team fix thousands of legacy issues at once, Clean as You Code applies the quality gate only to code changed since a reference point (the new code period: previous version, number of days, a specific date, or a reference branch). Legacy debt stays visible but does not block, while no new debt is introduced. For PR decoration the new code is the diff against the target branch. Configure the reference branch for long-lived branches so new code is measured correctly, and make sure the checkout has full history (fetch-depth: 0) so blame data is available.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Testing and Quality Gates