Must-share information (formatted with Markdown):
- which versions are you using : SonarQube Server - Enterprise Edition - v2025.1 (102418)
- how is SonarQube deployed: zip, Docker, Helm - don’t know use corporate instance
what are you trying to achieve
We are running sonar-scanner in the pipeline on MR (feature branch) and on main branch commits. The run on main branch has the goal to create a reference for following runs on feature branches.
In New Code
settings we set to use Reference branch
as baseline. Additionally to that we have Set a specific settings for a branch
for main
. As soon as we use here previous version
the pipeline fails on main with New Code
showed on Quality Gate
page older than one year, despite the fact that previous commit on main is few days old.
My expectation is
- that calculation of
new code
for feature branch compares last commit on feature branch and last commit on main. - that calculation of
new code
for main compares last commit on main with previous commit on main.
So I wonder what is the definition of previous version
in branch specific settings?
what have you tried so far to achieve this
Switching from previous version
to Number of days
works fine