Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/cover: spurious 0/1 coverage entry for forward-declared functions #6880
What steps will reproduce the problem? 1. go test -coverprofile=c.out os 2. go tool cover -func=c.out | grep sigpipe What is the expected output? os/file_posix.go: sigpipe 0.0% ... total: (statements) 65.6% (393/599) What do you see instead? os/file_posix.go: sigpipe 0.0% ... total: (statements) 65.5% (393/600) Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? GNU/Linux Which version are you using? (run 'go version') go version go1.2 linux/amd64 Please provide any additional information below. I came across this while comparing the output of go tool cover and gocov, finding a discrepancy in totals. I modified funcOutput in go.tools/cmd/cover/func.go to also print the raw function coverage counts as well as percentages; in this way, I confirmed that sigpipe had 0/1 lines covered, and was contributing to the total.