Question:
My understanding is that each sonar run is compared against with the BASELINE version. So since the last analysis is same as the BASELINE, the quality gate should not fail.
But here it is failing and seems to compare with the previous_version. Am I missing something?
Yes I can see the project overview tells that it is failing due to increased code smell. Please see image below. But the fact is that there is no increase from BASELINE version. I am not able to get why Sonar is complaining.
Thanks for the details. Now I understand your confusion.
In fact, the ‘on New Code’ metrics are not about delta from previous values, but about issues raised in code that has been touched (added or edited) in the new code period.
If we did look only at deltas then if I had 3 blocker bugs open, and I fixed 1 it would be “okay” for me to add a brand new one. Instead, with ‘on New Code’ metrics, if I fix one of my blocker bugs I still can’t add new ones.
So in my scenario, BASELINE version is controlled via some automated process. Now any one can make any change that can increase or decrease issues. What I want to achieve is that on every sonar run, the comparison is made against the BASELINE only. Is there a way where I can achieve that?
Is there a way where I can delete the analysis other than the BASELINE version automatically?