Sonarcloud is analysing PRs via bitbucket pipeline, but not main branch?

Hi,

We’ve covered this multiple times. Here’s one excerpt, emphasis added:

It seems you want develop to act as the primary branch in the project currently under consideration. The rules are the same:

  • Analyze develop without passing a sonar.branch.name parameter. Since branch names are picked up automatically by the integrations, you may need to run this first analysis manually.
  • Via the SonarQube Cloud UI, rename the main branch to develop
  • Analyze as normal. Further analyses of the sonar.branch.name=develop branch will land in the project’s primary branch

I assume you’re asking here about which branch the PR is compared to? If so, it’s largely a question of making sure the prerequisites are in place.

 
HTH,
Ann