-
Notifications
You must be signed in to change notification settings - Fork 18k
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/go: make -coverpkg properly ignore special directories #66171
base: master
Are you sure you want to change the base?
cmd/go: make -coverpkg properly ignore special directories #66171
Conversation
This PR (HEAD: 63eb9f4) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Than McIntosh: Patch Set 1: (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Than McIntosh: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-03-07T20:26:10Z","revision":"d5dac6a21a14a19b1eb45dfacf35bdc8488894bc"} Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Than McIntosh: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 1: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results): FAILURE
Error: Links:
Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
63eb9f4
to
9396509
Compare
Message from Matthew Hughes: Patch Set 1: (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Matthew Hughes: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
This PR (HEAD: 9396509) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
Message from Than McIntosh: Patch Set 2: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-03-07T20:57:14Z","revision":"88466b937d61663e96ed462c4b285d1f36287a49"} Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Than McIntosh: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Emmanuel Odeke: Patch Set 3: Hold+1 (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
-coverpkg
not ignoring special directories
This PR (HEAD: 4ba4bea) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
Message from Matthew Hughes: Patch Set 4: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Emmanuel Odeke: Patch Set 4: -Hold Code-Review+1 Commit-Queue+1 Run-TryBot+1 (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-03-19T18:58:12Z","revision":"4f35b335166bbf175ec73f9b1b1f0e54251f0fd9"} Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Gopher Robot: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
4ba4bea
to
7093c8e
Compare
Message from Matthew Hughes: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
This PR (HEAD: 7093c8e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
Message from Gopher Robot: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Gopher Robot: Patch Set 4: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Matthew Hughes: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Emmanuel Odeke: Patch Set 7: Code-Review+1 Commit-Queue+1 Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 7: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-03-24T23:24:53Z","revision":"64b6014edf67e7c3c4e19511f628a30f5a17298e"} Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Gopher Robot: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Emmanuel Odeke: Patch Set 7: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 7: This CL has failed the run. Reason: Tryjob golang/try/gotip-linux-386 has failed with summary (view all results): FAILURE
Tests failed. See all test results. Error: Links: Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Gopher Robot: Patch Set 7: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 7: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Michael Matloob: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Matthew Hughes: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
29c8bd9
to
84888c7
Compare
This PR (HEAD: 84888c7) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
84888c7
to
09944b0
Compare
This PR (HEAD: 09944b0) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
Message from Matthew Hughes: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Than McIntosh: Patch Set 9: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 9: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-04-15T12:49:58Z","revision":"dfc007b2baa838f2713d400bc183480a81b2d778"} Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Than McIntosh: Patch Set 9: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 9: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Go LUCI: Patch Set 9: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
09944b0
to
f48bd17
Compare
This PR (HEAD: f48bd17) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
f48bd17
to
1c0d215
Compare
This PR (HEAD: 1c0d215) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
Message from Funda Secgin: Patch Set 11: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
Message from Funda Secgin: Patch Set 11: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
The pattern passed to `-coverpkg` when running `go test` would not ignore directories usually ignored by the `go` command, i.e. those beginning with "." or "_" are ignored by the go tool, as are directories named "testdata". Fix this by adding an explicit check for these (by following a similar check in `src/cmd/doc/dirs.go`[1]) allowing us to ignore them. The scope of the change is limted to package matching to only the -coverpkg flag of `go test` to avoid impacting -gcflags and the other per package flags, e.g. we don't want to change behaviour for a user building something that imports a leading dot package who wants to set gcflags for it See linked issue for a reproduction. Fixes golang#66038 [1] https://go.googlesource.com/go/+/16e5d24480dca7ddcbdffb78a8ed5de3e5155dec/src/cmd/doc/dirs.go#136
1c0d215
to
c541b18
Compare
Message from Matthew Hughes: Patch Set 11: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/569895. |
This PR (HEAD: c541b18) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/569895. Important tips:
|
This change fixes "go test -coverpkg" to properly ignore
special directories that are typically ignored by the "go" command
for example directories beginnning with "." or "_" or "testdata"
Fixes #66038