问题
I'm new in SonarQube I started reading documentation but a lot of time a found "The leak period" but I didn't found anything about it can someone explain me what it means.
回答1:
Shortly, leak period is time frame (usually since last release), where specified criteria are measured on newly added code. This allows to focus on quality of fresh code and stop the accumulation of technical debt.
The "leak" concept is explained in documentation here https://docs.sonarqube.org/display/SONAR/Fixing+the+Water+Leak
Update SonarSource has fleshed-out and updated the terminology / philosophy: https://sonarqube.org/features/clean-as-you-code.
回答2:
While SonarQube's documentation does an adequate job explaining the theory, code.scan (sonarqube for salesforce code) does a great job explaining the scenarios.
How the Leak Period is set determines what issues are displayed as ‘new’ issues. There are several options for this.
Date
By entering a date in the format yyyy-MM-dd, SonarQube will show the issues that have arisen since that date.
Number of days
By entering a single number, SonarQube will show the issues that have arisen since that number of days ago. Keep in mind that the issues found in the last 5 days will not be the same a week from now.
Previous version
By using the
previous_version
setting, the Leak Period will be tracked from the previous version set with thesonar.projectVersion
parameter.For example, a scan is run on a project with the
sonar.projectVersion
set to1.0
. After time, the project'ssonar.projectVersion
is set to1.1
. The Leak Period set to previous_version would display all issues that have arisen since sonar.projectVersion 1.0 .Specific version
By entering your projects required
sonar.projectVersion
, the Leak Period will display all issues that have arisen since that specific version.For example, a scan is run on a project with the
sonar.projectVersion
set toBASELINE
. The project’ssonar.projectVersion
is then set toDEVELOPMENT
and all necessary scans are run over time. The Leak Period set toBASELINE
would display all issues that have arisen since the original scan.It is important to note that all violations, when they were introduced and the version they are introduced in are tracked. The Leak Period only filters this information on the project’s Overview dashboard and the Issues screen.
来源:https://stackoverflow.com/questions/41550260/what-does-the-leak-period-mean-in-sonarqube