# Sonar scanner pull request analysis not showing in Azure DevOps PR

**URL:** <https://community.sonarsource.com/t/sonar-scanner-pull-request-analysis-not-showing-in-azure-devops-pr/85748>\
**Category:** SonarQube Cloud\
**Tags:** go, pull-request, azure-devops, scanner, coverage\
**Created:** [March 13, 2023, 11:55am UTC](https://community.sonarsource.com/t/sonar-scanner-pull-request-analysis-not-showing-in-azure-devops-pr/85748 "2023-03-13T11:55:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carpentweet](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Carpentweet](https://community.sonarsource.com/u/Carpentweet)\
**Post date:** [March 13, 2023, 11:55am UTC](https://community.sonarsource.com/t/sonar-scanner-pull-request-analysis-not-showing-in-azure-devops-pr/85748/1 "2023-03-13T11:55:12Z")

</div>

Template for a good new topic, formatted with [Markdown](https://commonmark.org/help/):

- ALM used - Azure DevOps
- CI system used - Azure DevOps
- Scanner command used when applicable (private details masked)

```auto
steps:
  - task: Bash@3
    displayName: Execute Sonar Scanner CLI - pull request
    env:
      PROJECT_KEY: $(solutionName)
      SONAR_TOKEN: $(sonar_token)
      BRANCH: $(Build.SourceBranchName)
      PR_ID: $(System.PullRequest.PullRequestId)
      ORGANISATION: $(organisation)
    inputs:
      targetType: 'inline'
      script: |
        sonar-scanner -X -Dsonar.organization=$ORGANISATION -Dsonar.projectKey=$PROJECT_KEY -Dsonar.projectName=$PROJECT_KEY -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.branch=$BRANCH -Dsonar.pullrequest.base=main

```

- Languages of the repository - Go
- Only if the SonarCloud project is public, the URL
  - And if you need help with pull request decoration, then the URL to the PR too

- Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
- Steps to reproduce  
I am executing the above sonar scanner task in my Azure DevOps pipeline, it executes and shows the Pull Request in Sonar Cloud, but it’s not decorating the PR with any issues that are raised in the analysis.

We have separate Dotnet project where we’re using the inbuild Sonar Cloud tasks and they work as expected, decorating the PR with issues and code coverage analysis.

Are there additional properties that I’m missing? Is there documentation around doing this, I can’t find any on PR’s with sonar scanner.

---

<div class="post-metadata">

**Author:** ![Carpentweet](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Carpentweet](https://community.sonarsource.com/u/Carpentweet)\
**Post date:** [March 13, 2023, 1:44pm UTC](https://community.sonarsource.com/t/sonar-scanner-pull-request-analysis-not-showing-in-azure-devops-pr/85748/2 "2023-03-13T13:44:54Z")

</div>

I got the quality gate analysis to fail the build (correct behavior) by including the following properties:

```auto
sonar.pullrequest.provider= *****
sonar.pullrequest.vsts.instanceUrl=https://dev.azure.com/ ***** / 
sonar.pullrequest.vsts.project= *****
sonar.pullrequest.vsts.repository= *****

```
