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.


Screen Shot 2021-11-25 at 13.29.07
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}

β”œβ”€β”€ 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?