Skip to content

cmd/go: test / tool cover: uncomfortable colors on html page with coverage results #37796

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

Closed
cubical8569 opened this issue Mar 11, 2020 · 4 comments

Comments

@cubical8569
Copy link

cubical8569 commented Mar 11, 2020

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

$ go version
go version go1.14 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/azat/.cache/go-build"
GOENV="/home/azat/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/azat/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build595258626=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go get gopl.io/ch7/eval
$ go test -run=Coverage -coverprofile=c.out gopl.io/ch7/eval
$ go tool cover -html=c.out

What did you expect to see?

Distinguishable text on html page with cover info

What did you see instead?

Uncomfortable color set. It is hard to read gray, green and red on black. Perfectly it would be cool to have color settings for cover tool.
image

@toothrot
Copy link
Contributor

Thanks for filing. Closing this as a duplicate of #36685

@cubical8569
Copy link
Author

Thanks for filing. Closing this as a duplicate of #36685

#36685 is about accessibility for screen readers, not about look & feel.

@toothrot
Copy link
Contributor

The decision of what colors to use must be considered from an accessibility perspective, so I feel like #36685 is the most accurate issue to use for discussing this. Please let me know if that is not the case.

@birchb1024
Copy link

Try this

$ go tool cover -html=c.out | sed '/background/d' > c.html

@golang golang locked and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants