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:
- 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)
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?
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.
The error is telling you that analysis doesn’t see files located at the paths in the report. You need to straighten that out.