PullRequest Analysis misses issues


we are using SonarQube 8.9 DE with Bitbucket Server.

Today we found out, that a branch introduced new issues to the master, which were not discovered during branch development, as the PullRequest analysis didn’t show them.
The PR analysis did find some issues, but only on levels Minor and Info, so our Quality Gate was green. A complete sonar analysis on the master and on the branch itself showed two Code Smell issues, Minor (" Deprecated code should be removed") and Major( “Unused method parameters should be removed”), both in the same file. Both were not shown in the PR analysis, although they were introduced on this branch and the file is contained in the PR.

Our expectation was, that the PR analysis would find them, as these are issues in a changed file.

The sonar call including the branch and PR parameter seems to be fine, and as mentioned, the PR analysis did find some issues, so in general it is working.

Is there any reason, why a PR analysis should miss an issue in a changed file, whereas it is found by a complete analysis?

Thanks for any help!


Hi Carsten,

Welcome to the community!

You may be interested in this ticket:

FR-9 - PRs should show all new issues, not just the ones on changed code

In fact PR analysis only raises issues on new (added/updated) code. New issues raised on unchanged code are not shown. For your particular issues, I guess the only use of the method parameters was deleted, and the issue wasn’t raised on the PR because the method signature wasn’t changed.

Feel free to watch/vote for the Feature Request issue.


Hi Ann,

thanks for your answer!
Your guess is exactly what happened. I wasn’t aware that the PR analysis really only checks added or updated lines. We always thought the PR analysis contains all changed/added files, not just single lines.

The feature request seems to be what we need now.

Thanks for your help!