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: go test coverprofile wrong path at panic backtrace #20909
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Yes, you're right. line 12 rather then line11. This behaviour make tests harder to debug in case of panic. I don't know how go test works inside, but mb it's possible to print full path to the file like
As "go help testflag" says,
BUG: If a compilation or test fails with coverage enabled,
It's all but impossible to fix because of the way the go/ast package handles comments.
Unfortunate but unfixable.
However, there is some optimism that it can be fixed, according to #15757, of which this issue is a duplicate.