Query on Sonarqube coverage Report for go

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) : SonarQube Developer edition 10.2
  • how is SonarQube deployed: ZIP
  • what are you trying to achieve: Coverage
  • what have you tried so far to achieve this: think we have found the issue, just wanted to get confirmation on the behaviour.

Hello Support Team,

I am experiencing an issue where test coverage data is not being displayed in the SonarQube dashboard for a Go workspace project.

I can confirm the SonarQube scan itself completes successfully and all code quality metrics are shown.

I have a few other Go projects where coverage is displayed correctly in SonarQube, so I know the integration works in general. However, for this particular project, I noticed that coverage was missing in the SonarQube UI.

After investigating, I believe the issue is a path mismatch between the file paths in the Go coverage report and the paths SonarQube uses for indexing source files.

To confirm this, I manually updated the coverage report file (after it was generated by the Jenkins agent and before the SonarQube scan started) so that the file paths in the coverage report matched the paths SonarQube uses for indexing. Once I did this, SonarQube was able to display the coverage data in the UI as expected.

Example SonarQube scan log when paths match:

DEBUG 'cmd/app/models/error.go indexed with language 'go'
DEBUG Saving coverage measures for file 'cmd/app/models/error.go'

Example log when there is a mismatch:

WARN File 'app-api/saas/github/provider/client.go' is not included in the project, ignoring coverage

below is example sonar scan log:

DEBUG 'cmd/app/models/error.go indexed with language 'go'


This behavior is also described in the official documentation and blog posts:

Can you please confirm that SonarQube requires the file paths in the coverage report to match the paths it uses for indexing?
If so, is manually updating the coverage report paths before scanning the recommended approach, or is there a better way to handle this for Go workspaces and multi-module projects?

Thanks for your help!


Hi team, any updates on this pls.

Hi,

I invite you to familiarize yourself with the FAQ, and in particular this section:

I created a topic, when can I expect a response?

This is an open community with people volunteering their free time to provide assistance. We’re eager to contribute to the community, but you are not guaranteed a fast response.

Be patient

  • Wait a few days before bumping a topic that hasn’t received a response.

Regarding your question, your version is past EOL. You should update to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your update path is:

10.2 → 2025.1.4 → 2025.5 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after update, please come back to us, and post a full analysis log.

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

Thanks for your responses!
We’ll move forward with planning the upgrade. Since the upgrade will need to be tested in lower environments for various use cases before we roll it out to production, it might take some time.

In the meantime, I’d appreciate it if you could confirm the behaviour described below—either for our current version or in general.

Can you please confirm that SonarQube requires the file paths in the coverage report to match the paths it uses for indexing?

Thanks!

Hello,

awaiting confirmation , please check.

Thanks!
Dev

Hi Dev,

Yes, the paths in coverage reports must match the paths analysis is seeing.

 
HTH,
Ann

Hello Ann, Thanks for the confirmation,

this can be closed!

Regards!
Dev