Latest
Sonar 1 min read

Show SonarQube Results on a Pull Request

Show SonarQube Results on a Pull Request
Sonar · September 6, 2026

Version note: references describe SonarQube Server 2025.2 behaviour. Check your server, scanner and edition requirements. These examples were not run against a live SonarQube server.

What this guide covers

Pull-request decoration means showing SonarQube analysis results on a pull request in your Git provider. The code analysis and the posting of the result are separate operations.

Before you start

Check that your SonarQube edition supports pull-request analysis and your Git provider integration. Analyze the target branch first and keep its Git history available to the scanner.

Step 1: Confirm analysis succeeds

Run analysis for a test pull request. Check the project’s Background Tasks page. A failed task must be fixed before troubleshooting a missing pull-request comment or check.

Step 2: Check pull-request details

Supported CI systems can supply these automatically. If you must configure them manually, the properties look like:

sonar.pullrequest.key=42
sonar.pullrequest.branch=feature/payment-retries
sonar.pullrequest.base=main

Replace the number and branch names with the real pull request. Do not also configure a branch-analysis name for the same scan.

Step 3: Connect SonarQube to the repository

Configure the documented Git-provider integration and bind the SonarQube project to the correct repository. Verify the integration account or app can post checks. The scanner token authorizes analysis; it does not automatically authorize posting to GitHub or another provider.

Step 4: Test with a new commit

Push a small change. Confirm that the completed analysis and posted result belong to the latest commit, not an older job. Use the provider’s required-check rules if the result should block merging.

Check the result

You should see the current pull request’s analysis in SonarQube and a corresponding result in the Git provider. If only one appears, check the connection responsible for the missing result.

References

PB
Written by

Parul Bedi

Notes and guides by Parul Bedi.

Up next

Reload a Node.js Application During Docker Development

Docker September 8, 2026 1 min read
Open post

Conversation

0 comments

No comments yet. Start the conversation below.

Leave a comment

Replying to a comment.
Be kind. Markdown is not supported in comments.