Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page, you find common errors when using the app and how to resolve them.

...

Configuration Checklist

  1. Verify your SonarQube server settings in global settings of Bitbucket

  2. Run SonarQube source code analysis for main branch

    1. Configure the source code analysis

    2. Analysis results should be visible in SonarQube

  3. Configure corresponding SonarQube project in repo settings of Bitbucket

  4. Go to source code view and see the existing Sonar issues/stats

    1. You should see the SonarQube statistics and issue annotation

      Image AddedImage Added
    2. Statistics and annotations are missing? Verify your repository configuration:

      1. Did you configure the correct analysis directory?

      2. Does the SonarQube project key match with the configuration in Bitbucket?

        Image Added

  5. Create a pull request with issues in the code.

  6. Run SonarQube source code analysis for source branch of your pull request.

  7. 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.

    1. An error

      Image Added

      hints at a wrong Sonar analysis configuration or a wrong analysis directory setting

    2. No issue annotations:

      1. Verify that you can see the issues that should be shown in SonarQube

      2. Do the issue annotations appear after clicking “Refreshing Sonar analysis” in the pull request overview? Then check your Webhook configuration

1. Sonar issue information not found

...

If you are sure that there is a project in SonarQube with such a key in SonarQube, check the status of the following option selected SonarQube Edition in the repository settings of the Sonar for Bitbucket app:

...

If you use a community edition, the option has to be disabled.

If you use a commercial edition (like developer), this option needs to be enabled.Sonar server configuration:

...

3. No annotations for SonarQube issues within a pull request

...