Skip to content
New issue

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? Sign in to your account

coverage: show code coverage for multiple packages #108

Closed
ramya-rao-a opened this issue May 28, 2020 · 1 comment
Closed

coverage: show code coverage for multiple packages #108

ramya-rao-a opened this issue May 28, 2020 · 1 comment
Labels
FeatureRequest FrozenDueToAge HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.

Comments

@ramya-rao-a
Copy link
Contributor

Currently, the code coverage is applied only to the files that fall under the package corresponding to the current file that is open. The feature request is to support showing code coverage for multiple packages.

While using the flag -coverpkg=all, the go test command does create a cover profile for all packages, the extension fails to apply it correctly. The problem lies in converting the relative paths in the cover profile to absolute paths that the editor can understand.

For more, please see microsoft/vscode-go#816,

@ramya-rao-a ramya-rao-a added FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. labels May 28, 2020
@stamblerre stamblerre changed the title Code coverage for multiple packages coverage: show code coverage for multiple packages Jun 3, 2020
@hyangah
Copy link
Contributor

hyangah commented Aug 20, 2020

This is available since 0.16 (https://go-review.googlesource.com/c/vscode-go/+/238697).
Users can set the flag using go.testFlags or manually run from the terminal and feed to the Go: Apply Coverage Profile command.

Thanks @pjweinbgo and @suzmue for fixing and verifying!

@hyangah hyangah closed this as completed Aug 20, 2020
@golang golang locked and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Projects
None yet
Development

No branches or pull requests

3 participants