SonarQube Quality gate inconsistent

  • SQ Version: 9.9 LTS upgraded from 9.6 on 03/28/2023

We have noticed since last week that a specific project is returning inconsistent quality gate statuses mainly on new code.

Our rule for new code is the standard Sonar Way. The overall code is more lenient with grades B or lower.
From the screenshots you can see the same new code metrics passed on two branches and it failed one the other one. We haven’t made any changes in our Quality gates and just confused with this sudden behavior. We had to modify our pipelines in def to not block us.

Hm. That also looks weird to me.

  • Can I ask what New Code Period you’re using for this project and for these branches in particular?
  • I noticed the two later screenshots have analysis from a few weeks ago. If you re-run analysis on these branches, does it snap into place or stay the same?

It is indeed strange. Unfortunately, those branches have been deleted after the PR, asking developer for new branch to monitor will report back with findings.