cmd/go: duplicate lines in coverage file after update to 1.22 #65636
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.22.0 windows/amd64
Output of
go env
in your module/workspace:What did you do?
Clone https://github.com/alainstoffels/coverageRepro
Run inside the root of the repo:
go test -cover -coverpkg=./... -coverprofile=coverage.out ./...
What did you see happen?
coverage.out now contains 2 lines for
coverageRepro/bar/bar.go
. One where it indicates that it's not covered, and another where it indicates that it is covered:foo.Foo()
callsbar.Bar()
, sofoo.TestFoo()
should coverbar.Bar()
.What did you expect to see?
I would expect it to output a single line for
coverageRepro/bar/bar.go
, indicating it as covered, like it did before the 1.22 update:The text was updated successfully, but these errors were encountered: