What does the “leak period” mean in sonarQube?

冷暖自知 提交于 2019-12-20 17:39:57

问题


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 the sonar.projectVersion parameter.

For example, a scan is run on a project with the sonar.projectVersion set to 1.0 . After time, the project's sonar.projectVersion is set to 1.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 to BASELINE. The project’s sonar.projectVersion is then set to DEVELOPMENT and all necessary scans are run over time. The Leak Period set to BASELINE 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!