On SonarQube Community Edition 6.7.3-LTS and 7.9.-LTS I have the following use case :
- I have set sonar.leak.period = previous_version on my project
- I have Jenkins CI environment to perform SonarQube Analysis on maven project (hosted on gitlab) and before a release build I do a SonarQube analysis with a wait for quality gate step in my jenkins pipeline.
- In my version history i have 1.0.0, 1.1.0, 1.2.0.
Version 1.2.0 is not deployed in production environment yet and i have an hotfix to release with 1.1.1 version.
So I did a job to do a sonarqube analysis on 1.1.0 tag and don’t break version history.
And then I perform the 1.1.1 release version, but no new line is detected on the leak period.
After several tests I can confirm this behaviour :
If i did 1.1.0 tag analysis and then i commit new code after this and perform 1.1.1 analysis the new lines are well computed.
If i did 1.1.0 tag analysis just before my 1.1.1 release (the hotfix git commit date is before 1.1.0 SonarQube event) there is no new code.
I’m ok, it’s not an issue but is it possible to “rewrite” analysis history and change the date of a version event ?
Furthermore the sonarqube documentation is not very detailed on previous version leak period.