Sonar-scanner is unable to publish code coverage and Unit test information to Sonarqube

Hi Team,
We are unable to to see the code coverage and unit test reports in Sonarqube for our code based on Go programming language.

Warning/ Error details:

  1. we keep getting the warning like
    File ‘/go/src/git.tools.movilizer.cloud/go/tnt-configuration/pkg/util/validation.go’ is not included in the project, ignoring coverage

2)WARN: Failed to find test file for package git.tools.movilizer.cloud/go/tnt-configuration/pkg/api and test TestGeDataConfigurationWithData

Please check attached log, cover.out and report.json for more details.

Sonar_logs.txt (26.7 KB)
Coverage_TestReport.zip (19.4 KB)

Version: Sonar-scanner-3.2.0.1227-linux

Thanks,
Rajesh.

any help on this issue?

Hi,

What did you make of these errors:

From what I see, it looks like your coverage report references a file path that stats from a /go directory in server root. Do you have a go directory in your server root?

 
Ann

Hi Ann,
Thanks for the response. My code is located in /repo/ not sure why its referring /go directory. Yes I have /go directory as well. This directory is created from base docker base image version.

Thanks,
Rajesh.

Hi Rajesh,

The error is telling you that analysis doesn’t see files located at the paths in the report. You need to straighten that out.

 
HTH,
Ann