# Go code coverage not showing in sonar cloud update

**URL:** <https://community.sonarsource.com/t/go-code-coverage-not-showing-in-sonar-cloud-update/51916>\
**Category:** SonarQube Cloud\
**Tags:** go, coverage\
**Created:** [October 22, 2021, 8:27am UTC](https://community.sonarsource.com/t/go-code-coverage-not-showing-in-sonar-cloud-update/51916 "2021-10-22T08:27:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliper\_simanjuntak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/juliper_simanjuntak/32/26762_2.png) [@juliper\_simanjuntak](https://community.sonarsource.com/u/juliper_simanjuntak)\
**Post date:** [October 22, 2021, 8:27am UTC](https://community.sonarsource.com/t/go-code-coverage-not-showing-in-sonar-cloud-update/51916/1 "2021-10-22T08:27:28Z")

</div>

My problem is currently we are successful in showing code coverage by using this snipset code but after the display of sonar cloud update, the code coverage not showing again.

- github/action

```auto
on:
  # Trigger analysis when pushing in master or pull requests, and when creating
  # a pull request.
  push:
    branches:
      - dev
      - master
      - pre_release
  pull_request:
    types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
  sonarcloud:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          # Disabling shallow clone is recommended for improving relevancy of reporting
          fetch-depth: 0
      - uses: actions/setup-go@v2
      - run: |
              go version &&
              go test -covermode=atomic -coverprofile=coverage.out ./... &&
              ls -lah
              exit 0
      - name: SonarCloud Scan
        uses: sonarsource/sonarcloud-github-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

```

- sonar.properties

```auto
sonar.organization=my
sonar.projectKey=my-key
sonar.projectVersion=1.0

sonar.sources=.
sonar.exclusions= **/*_test.go,** /vendor/ **,** /testdata/*

sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions= **/vendor/**
sonar.go.coverage.reportPaths=coverage.out
sonar.go.tests.reportPaths=report.json

```

---

<div class="post-metadata">

**Author:** ![Gregoire\_Aubert](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gregoire_aubert/32/29_2.png) [@Gregoire\_Aubert](https://community.sonarsource.com/u/Gregoire_Aubert)\
**Post date:** [October 25, 2021, 12:55pm UTC](https://community.sonarsource.com/t/go-code-coverage-not-showing-in-sonar-cloud-update/51916/2 "2021-10-25T12:55:05Z")

</div>

Closing this post as it’s a duplicate of [[HELP] Golang code coverage not working anymore](https://community.sonarsource.com/t/help-golang-code-coverage-not-working-anymore/51927)

---

<div class="post-metadata">

**Author:** ![Gregoire\_Aubert](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gregoire_aubert/32/29_2.png) [@Gregoire\_Aubert](https://community.sonarsource.com/u/Gregoire_Aubert)\
**Post date:** [October 25, 2021, 12:55pm UTC](https://community.sonarsource.com/t/go-code-coverage-not-showing-in-sonar-cloud-update/51916/3 "2021-10-25T12:55:08Z")

</div>


