I have a relatively simple branch setup in git, with two long-lived branches: master and development. We do PRs against either of those two branches, for example:
feature/foo -> development or
hotfix/bar -> master
We automatically do builds of those PR branches, in addition to automatically building master and development.
The behavior I’m seeing is that sometimes the PRs will report only the issues within the PR, and sometimes the PRs will report every single issue that exists in the master branch (regardless of which branch is the actual base). This will vary over the course of the day - sometimes it’ll report 3 issues in a PR, and after a single push to that branch the subsequent build will report 1400 issues - many in files that were totally untouched.
What is going on here? I can’t see any appreciable difference between the runs that work and the runs that don’t.
I am building
+:refs/pull/(*)/head and using the latest version of the SonarScanner dotnet global tool and the latest version of SonarQube (updated yesterday).