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: increase coverage precision to at-least 2 decimal places #38175

Open
staticmukesh opened this issue Mar 31, 2020 · 1 comment · May be fixed by #38176
Open

cmd/cover: increase coverage precision to at-least 2 decimal places #38175

staticmukesh opened this issue Mar 31, 2020 · 1 comment · May be fixed by #38176
Labels

Comments

@staticmukesh
Copy link
Contributor

@staticmukesh staticmukesh commented Mar 31, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.1 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

macOS Mojave darwin/amd64

What did you do?

$ go test -v -coverprofile=coverfunc.out ./...
$ go tool cover -func=coverfunc.out
hello.go:84:         Handle                          92.1%
total:              (statements)                     92.1%

What did you expect to see?

I want to see total coverage to be 92.12% instead of 92.1%. We want to track coverage to have higher precision, atleast 2 decimal places.

@staticmukesh staticmukesh linked a pull request that will close this issue Mar 31, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 31, 2020

Change https://golang.org/cl/226538 mentions this issue: cover: change coverage precision to .2f

@ALTree ALTree changed the title cover: increase coverage precision to at-least 2 decimal places cmd/cover: increase coverage precision to at-least 2 decimal places Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.