PR scan passed but develop scan failed

We are using Enterprise Edition v2025.3.1 (109879), running on a VM.

New Code is identified by the Number of Days option (90 days).

We had a PR on Bitcket, which has a change in one file. And the change was for replacing two code blocks with two lines of code. SonarQube PR scan detected the change correctly as 2 new lines and the scan was successful on the Pull Request execution.

After merging it to develop, the pipeline started to fail because of detecting issues on other lines in the same file where we haven’t changed.

A successful PR build resulted in a failure on the integration/development branch.
Why the PR scan didn’t fail but merging to develop branch resulted a failure?

This way of behavior is very frustrating for our developers and unpredictable.

Thanks in advance for the guidance to resolve this weird behavior.

Hi,

There’s not a huge amount to go on here. I take it the branch analysis failed because of… issues? In… new code?

If so, then either the prerequisites aren’t in place for your branch analysis (they’re listed in the context of PR analysis but are largely applicable to both) or there’s some misalignment between what’s considered ‘new’ for your branch vs your PRs.

Note that for PRs, what’s “new” is what’s changed versus the base branch. It’s a very contained definition of new.

 
Ann