Sonar Qube Server, developer edition, version 10.8, scanner 6.2.1.4610.
Deployed with Docker.
We’ve just migrated from Server 8.9 to Server 10.8 (following the migration path via 9.9) and running several tests to update our CICD infrastructure.
We are trying to use the new “reference branch” feature for new code definition.
On an existing branch, we run a new analysis => the result is OK, the overview tab shows our new issues (maybe 100) and new code coverage (with many missing lines). Sonar display “new code: Compared to xxx” where xxx is the reference branch, as expected.
If we run a second analysis with the same code base, the overview tab report 0 issues and 0 missing coverage line. Sonar still display “new code: Compared to xxx” where xxx is the reference branch.
The expected result is for the second analysis to display the exact same amount of issues and missing coverage on new code, since nothing has changed in the analyzed code nor in the reference branch.
The same behavior was reproduced by analyzing the code in a new branch, still with the same reference branch. Each time, only the first analysis seams to produce correct result.
On another test case, the code was slightly modified before the second analysis, and this time the new code seams to be the slight modification, rather than the diff versus the reference branch.
It seams sonar behave as if the new code is configured as “previous version”
although it’s configured with reference branch and display it explicitly on the overview tab.
Thank for any help/suggestion…
Boris.