How does sonar scm analysis work?

Hi again,

So looks like SonarCloud finds files that are not related to a Pull Requests as "new code" - #32 by Michael_Carter was a solution that worked for us too.

I’m still looking to understand

  1. Why does sonar-scanner prefer refs/heads/development over refs/remotes/origin/development . In a CI environment, the local reference for a branch would always be stale unless that is explcitiyl checked out.
  2. What impact could the gitlab merge commit have on finding the correct merge base.