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

cmd/cover: add total (statements) coverage to HTML output #16888

Closed
savinov opened this issue Aug 26, 2016 · 3 comments
Closed

cmd/cover: add total (statements) coverage to HTML output #16888

savinov opened this issue Aug 26, 2016 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@savinov
Copy link

savinov commented Aug 26, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.7 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/user/gowork"
    GORACE=""
    GOROOT="/home/user/go"
    GOTOOLDIR="/home/user/go/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
    CXX="g++"
    CGO_ENABLED="1"
  3. What did you do?
    https://blog.golang.org/cover

go tool cover -func=coverage.out

size.go:    Size          42.9%
total:      (statements)  42.9%

go tool cover -html=coverage.out

  1. What did you expect to see?
    I'd want to see total (statement) in generated HTML as in console output (func flag).
  2. What did you see instead?
    An HTML without total (statement) coverage
@quentinmit quentinmit added this to the Go1.8Maybe milestone Aug 26, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 10, 2016
@rsc rsc modified the milestones: Go1.9, Go1.8Maybe Nov 2, 2016
JayNakrani added a commit to JayNakrani/go that referenced this issue Nov 5, 2016
Updates golang#16888.

Change-Id: Iab6097c3974a4a7d5d97d28da2dc463671b80075
JayNakrani added a commit to JayNakrani/go that referenced this issue Nov 5, 2016
Fixes golang#16888.

Change-Id: Iab6097c3974a4a7d5d97d28da2dc463671b80075
@JayNakrani
Copy link
Contributor

After golang.org/cl/32762:

$ ../pkg/tool/linux_amd64/cover -func=coverage.out
size.go:3:  Size            3/7     42.9%
total:      (statements)    3/7     42.9%

And for -html:
cover_screenshot

@gopherbot
Copy link

CL https://golang.org/cl/32762 mentions this issue.

@robpike
Copy link
Contributor

robpike commented Jun 26, 2017

The CL has been abandoned. We decided not to proceed with this.

@robpike robpike closed this as completed Jun 26, 2017
@golang golang locked and limited conversation to collaborators Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants