Bitbucket Cloud Integration
SonarCloud provides information about the current state of your code directly in the repository overview and pull request view of Bitbucket Cloud.
In the repository overview (accessed by selecting Source in the left sidebar), the current quality metrics for the main branch can be displayed at the top of the page:
To enable this feature, you must enable the widget. Go to Your Project > Your Repository > Repository settings > SonarCloud > Settings and select Show repository overview widget.
Note that the quality widget in this Source view always shows the status for the master branch, even if you select another branch in the drop-down branch selector. This is a limitation of the current integration with Bitbucket.
Pull request view
When viewing an analyzed pull request you will see quality metrics displayed at the top, similar to what you see in the repository overview:
Additionally, the right sidebar contains a code insights section that provides access to code reports. The keyboard shortcut to expand and collapse the right sidebar on repository pages is
You can expand the Report section and select SonarCloud Code Analysis to view a full report of all the issues SonarCloud found in the pull request:
You don't have to navigate to
sonarcloud.io because this view lets you see the issues identified by SonarCloud right in Bitbucket.
Do you have sample projects on Bitbucket Cloud?
You can take a look at these various projects: Sample projects analyzed on SonarCloud.
I don't see the widget with quality information whereas I configured everything.
Make sure that your browser is not using some extensions like AdBlocks. They tend to break the integration of third-party applications in Bitbucket Cloud.
Upcoming features and improvements
There are various areas in which you can expect new features and improvements:
- Inline comments to show the issues within the pull request
- Better and easier team onboarding
- Automatic analysis (i.e. no need to configure anything from Pipelines)