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.

Repository overview

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:

Screenshot of the BitBucket interface with the SonarCloud project analysis results widget.

To enable this feature, in the repository overview go to Repository settings > SonarCloud > Settings and check Show repository overview widget:

Screenshot of the BitBucket interface showing how to enable the analysis 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 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:

Screenshot of the pull request quality gate widget in BitBucket.

Additionally, the right sidebar contains a code insights section that provides access to code reports:

Screenshot showing how to access code reports in the BitBucket interface sidebar.

(To enable the right sidebar, go to Personal Settings > Features > Labs and enable New pull request experience.)

You can expand this section and click on SonarCloud Code Analysis.

This will bring up a full report of all the issues found in this pull request by SonarCloud:

Screenshot of the full report of all the issues found in the pull request by SonarCloud.

This view lets you see the issues identified by SonarCloud right in Bitbucket. You don't have to navigate to


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)

© 2008-2022, SonarCloud by SonarSource SA. All rights reserved.