Add support for Go/Golang coverage reports
See original GitHub issueIs your feature request related to a problem? Please describe. Go/Golang coverage reports do not seem directly supported by this extension.
Describe the solution you’d like
It would be awesome if the extension could understand the report generated by go test
, out of the box.
Describe alternatives you’ve considered I tested another extension that was supposed to display the coverage of .go files, but it failed with an error message at startup.
Additional context Here’s a workaround that I used successfully to make Vscode Coverage Gutters display the coverage of my go files, run the following command:
$ go test -v -coverprofile=go-coverage.out -covermode=atomic -coverpkg=./... ./... && go run github.com/richardlt/gocover-cobertura < go-coverage.out > coverage.xml
… then, re-activate the “watch” if necessary. You should get something like that:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Getting Started with Code Coverage for Golang - Codecov
This blog post will show you how to get a simple Golang project up and running with tests and code coverage with Codecov....
Read more >Code Coverage in GoLang
Here, we are going to see some simple coverage reports generated by the coverage tool. First, we use a simple file containing a...
Read more >Go: tests with HTML coverage report - Kanan Rahimov - Medium
Tests result viewed as an HTML page. No matter what, tests are essential. Coverage reports help us to write better tests. Go has...
Read more >The cover story
For the new test coverage tool for Go, we took a different approach that avoids dynamic debugging. The idea is simple: Rewrite the...
Read more >Code coverage | GoLand Documentation
When a file is opened in the editor, each line is highlighted with regard to its code coverage status: Lines executed during simulation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have https://facebook.github.io/watchman/ configured to convert the go coverage to lcov format using https://github.com/jandelgado/gcov2lcov
This works great and the
go-nmea.coverprofile
file gets update thelcov.info
is updated immediately.@williammartin Thanks for the extra info 👍🏻, I am sure someone will find the above valuable.