This concept is the following: when you have a water leak at home, do you start cleaning the ground to remove water or do you start fixing the leak first? This concept applies to the management of technical debt. You should first start fixing the daily incoming technical debt (i.e. issues on your new code) before starting fixing existing issues.
To enforce this, we should introduce this concept inside the SonarQube configuration settings. This "Leak Period" should be the "Since previous version" period.
To make things easier, here's how we'll implement this solution:
- "period1" will be renamed "Leak Period"
- by default it will set to "Since previous version"
- This is defined in CoreProperties
- and so period2 should be by default "Since previous analysis" and period3 "over 30 days"
- Same, in CoreProperties
- and the default "SonarQube way" quality gate should therefore update its differential values to use period 1 instead of period 3
- This is in RegisterQualityGates