Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Sonarqube version : 6.7 (build 33306)
scanner: 3.4.0.905
jacoco: 0.7.9 - what are you trying to achieve
We got a branch named CHG** which will merge to develop branch only if the new code coverage is more then 80%. (new code is in the CHG branch, develop branch is baseline)
My steps:
-all code are committed
-git checkout develop
-mvn -T 4 clean org.jacoco:jacoco-maven-plugin:0.7.9:prepare-agent install -Dmaven.test.failure.ignore=true
-mvn sonar:sonar -Dsonar.projectVersion=BASELINE
//no code check-in anymore
-git checkout CHG**
-mvn -T 4 clean org.jacoco:jacoco-maven-plugin:0.7.9:prepare-agent install -Dmaven.test.failure.ignore=true
-mvn sonar:sonar -Dsonar.leak.period=BASELINE
The new code coverage will not display on dashboard, but at the code page the new code are exist.
But if after set baseline operation, check-in some code to CHG branch and:
-git checkout CHG**
-mvn -T 4 clean org.jacoco:jacoco-maven-plugin:0.7.9:prepare-agent install -Dmaven.test.failure.ignore=true
-mvn sonar:sonar -Dsonar.leak.period=BASELINE
the new code coverage will be shown.
I am not sure the new code detection method whether depends on the code check-in time that earlier or later than set baseline. but can you fellows can fix my issue?
(ps. I tried to set baseline project date earlier than the first commit code time, new code will be shown)