Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 3d7a08e

Browse files
Add a note for docker users
Provide the workaround found for #35 until the main gocov-xml supports the `-pwd` option.
1 parent 180dff9 commit 3d7a08e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/cover.out {{.
146146
go list -f '{{if len .TestGoFiles}}"gocov convert {{.Dir}}/cover.out | gocov-xml > {{.Dir}}/coverage.xml"{{end}}' ./... | xargs -L 1 sh -c
147147
```
148148

149+
> Note for docker users: by default, `gocov-xml` uses absolute paths which prevents this plugin to use
150+
> coverage files built on a different file system than the one used to run the plugin.
151+
> A workaround is to use a [patched version of gocov](https://github.com/Centny/gocov-xml.git) which provides
152+
> the `-pwd` option to use relative paths instead of absolute paths. See [#35](https://github.com/uartois/sonar-golang/issues/35) for details.
153+
149154
# Tests (since release 1.1)
150155

151156
For test metrics you must generate a junit report file.

0 commit comments

Comments
 (0)