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!