Golang test coverage not showing in Sonar Cloud

I have a Golang repository on Bitbucket with a bitbucket pipeline for some automation approaches. in one of the steps, there is a command make scan that generates some outputs such as coverage.out in report/ directory.

1-


2-
Screen Shot 2021-11-25 at 13.29.07
3-
Screen Shot 2021-11-25 at 13.29.49

also, I have a file named sonar-project.properties in the root directory which contains the below information:

sonar.projectKey={project key}
sonar.organization={organization}
sonar.sources=.
sonar.qualitygate.wait=true
sonar.go.tests.reportPaths=report/test.out
sonar.go.coverage.reportPaths=report/coverage.out
sonar.go.govet.reportPaths=report/govet.out
sonar.go.golint.reportPaths=report/staticcheck.out
sonar.go.exclusions=**/**_test.go,**/test/**,**/docs/**,**/main.go,**/Server.go

directory:
.
β”œβ”€β”€ Makefile
β”œβ”€β”€ README.md
β”œβ”€β”€ bitbucket-pipelines.yml
β”œβ”€β”€ config
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ docs
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ main.go
β”œβ”€β”€ report
β”‚ β”œβ”€β”€ coverage.out
β”‚ β”œβ”€β”€ govet.out
β”‚ └── test.out
β”œβ”€β”€ sonar-project.properties
└── src

But when I check the SonarCloud result, this message is shown β€œcoverage needs some extra steps.”
Can you guide me what is the issue here and how can I support coverage in the SonarCloud Dashboard?

Hey there.

Are you seeing this message:

On the main branch of the project (after running this exact analysis on the main branch), or is it on a short-lived branch/pull request?

Hey @Colin
Thanks for the quick reply, I have the message in the short-lived pull request.

Hey there.

You are probably facing this issue.

So no worries – nothing you need to do on your side. I’ll funnel this feedback on internally, hopefully we’ll see something fixed soon!

1 Like

Hey @aberah

Thanks again for the report. A fix was deployed – can you confirm on your side?