How to use sonarcloud with bitbucket PRs, i.e. how to setup gates of any sort?

We have got to the point where we can run the sonar alalysis via maven and our build system.

The problem is there is no connection with developers or the development process.

When the analysis runs, e.g. on your local dev machine or a pipeline which runs when you push a branch, you dont know if it passed or failed, or what the results were. Developer may or may not login to the sonar UI, but even if they do they just see the results from the latest run, which may or may not be their code - it could have been from someone else editing unrleated files from the same repo.

According to the marketing material, there are gates which would stop PRs being merged. Is this possible with bitbucket? If so, where is this documented?

We havent been able to find any mention of this, e.g. this doc: Bitbucket Cloud | SonarQube Cloud Documentation

Just stops at the point when the analysis is run, it doesnt say how gates can be setup or how the rules it applies (which we have seen so far are bad in terms of incorrect/obvious false positives).

Hey @nutmix

It looks like this section of our docs fell out of our SonarQube Cloud docs. The SonarQube Server docs are equally valid for SonarQube Cloud and I will ping our docs folks about this gap.

Thanks, but the crux is we cant figure out how to get sonar to work with branches and pull requests at all, we are missing the cirtical info how to setup sonar to recognise any type of branch or PR. If we run the maven command with a chencked out pull request branch, nothing happens in that in the UI, it says pull requests 0 and branches 1 (the main branch).

We cant find the basic docs how to set this up. The second part is then making some sort of gate to block the PRs from being merged.