Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
Processing the coverage profile generated from go test -coverprofile to integrate it with editors,
we need clarification of the output format.
go test -coverprofile
The profile looks like
mvdan.cc/xurls/v2/xurls.go:56.35,59.25 3 1
and the first element of each item (link) is often called FileName, but this is not the true file name.
Code here determines what this is. It is either the import path and the base file name, or the absolute path (isn't it platform dependent?)
See how go tool cover -html=... parses the profile output. Any editor integration work requires to implement the same to associate the coverage info with the source code.
go tool cover -html=...
This detail is hidden deep in the source code. We need to document this.
The cover tool documentation can be the first place users would search.
cc @ianthehat @pjweinbgo @jayconrod
The text was updated successfully, but these errors were encountered:
No branches or pull requests