Quality gate new code definition empty detection after merge main into feature branch

We are using the SonarQube Developer Edition on version
For the SonarQube gradle plugin, we are on 3.2.0.

Noticed some weird behavior recently and wanted to seek possible explanations and solutions.

We are moving to reference branches for new code definition for quality gates in place of previous commit. It has worked well but recently while working on a feature branch, our main branch was updated and I merged main to keep my feature branch up to date.

Now my quality gate for the feature branch is no longer detecting my new code. I have not tested whether rebasing causes this issue either.

Also, how would new commits from main branch affect the new code for my feature branch? Hypothetically, what if another developer writes overlapping code duplicating something in my feature branch, is that no longer detected in the quality gate as new code?



We’ve done some work on new code detection in the 9-series. I don’t suppose you can upgrade to the latest version, 9.6.1?


Hey Ann, let me talk with the team about upgrading our SonarQube version. Are you referring to upgrade 9.3?


I’ll be honest & say I don’t remember which version, but it was early in the 9-series. Those upgrade notes you’ve highlighted aren’t really relevant to the detection of new code tho.