Mismatch of code reports between master and pull request analysis

SonarQube version: 2025.3

Recently, our dev team highlighted that they have observed the mismatch of code at master reports (wrong results or old issues are highlighted) after the consideration of the pull request analysis reports of feature branch and merge it into master. How we can fix this behavior.

Hi,

Welcome to the community and thanks for this report!

I don’t understand what’s going wrong here. Can you provide more detail? Perhaps with screenshots, redacted as necessary?

 
Thx,
Ann

Hi Anna,

We have project which is having a pull request analysis decoration enabled (Jenkins).

Developers reported that they are facing challenges like the scan results are not correct from the pull request analysis of the project . Once ,the feature branch code is pushed to master by referring the pull request analysis results ,they have observed inaccurate results in Master code scan such as code smells which are not reported in pull request scan and reporting once old issues once merged into master .

Thanks

Hi,

Again, you haven’t provided much to go on here.

For this, it’s quite possible it’s legitimate. In PR analysis, we only report issues raised on changed lines. But a change in one line could cause new issues in an unchanged line. I would need more details to give you a more precise answer.

 
Ann