...
Verify your SonarQube server settings in global settings of Bitbucket
Run SonarQube source code analysis for main branch
Configure the source code analysis
Analysis results must be visible in SonarQube
Configure corresponding SonarQube project in repo settings of Bitbucket
Go to source code view and see the existing Sonar issues/stats
You should see the SonarQube statistics and issue annotation
Statistics and annotations are missing? Verify your repository configuration:
Did you configure the correct analysis directory?
Does the SonarQube project key match with the configuration in Bitbucket?
Create a pull request with issues in the code.
Run SonarQube source code analysis for source branch of your pull request.
Go to the pull request view and check if the Sonar analysis results are visible. You should see a quality gate status overview, and issue annotations in the pull request diff.
An error
hints at a wrong Sonar analysis configuration or a wrong analysis directory setting
No issue annotations:
Verify that you can see the issues that should be shown in SonarQube
Do the issue annotations appear after clicking “Refreshing Sonar analysis” in the pull request overview? Then check your Webhook configuration
...
you are using localhost or a wildcard address for Bitbucket which is not supported because SonarQube does not allow these. Please use the real Bitbucket hostname instead.
you do not have a valid HTTPS certificate for Bitbucket configured in SonarQube's JVM or , see this community article for more information.
you have invalid proxy settings that prevent SonarQube from connecting Bitbucket. Please see this community article for more information.: check your
-Dhttp.proxyHost
and-Dhttp.nonProxyHosts
JVM arguments
Info |
---|
For SonarQube 7.7, please make sure to pass -Dsonar.analysis.scmRevision=COMMIT_ID to your SonarQube analysis. For newer SonarQube versions, this is not necessary anymore. |