-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
go/printer: do not treat comments inside a ast.Decl as godoc #69134
go/printer: do not treat comments inside a ast.Decl as godoc #69134
Conversation
ff6aec1
to
9a0a873
Compare
This PR (HEAD: 9a0a873) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 2: Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-08-29T12:13:36Z","revision":"0b4333588c2b13f9b6925a9adea453a4ec3c5e9b"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 2: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
9a0a873
to
f0d9017
Compare
This PR (HEAD: f0d9017) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
Message from Mateusz Poliwczak: Patch Set 3: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-08-29T15:26:10Z","revision":"fab65c8a24bcb02127591335724967fe38e767a7"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 3: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
This PR (HEAD: 6205b2d) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
Message from Mateusz Poliwczak: Patch Set 4: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-08-29T17:09:09Z","revision":"3cc5e735928d96d977a3d7374ee3ed00b6ee75e1"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 4: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
This PR (HEAD: a181d7c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
This PR (HEAD: b56bd67) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
Message from Mateusz Poliwczak: Patch Set 10: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 10: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-08-29T19:46:38Z","revision":"0fbbf3f63639cd569e3012d5531f26bc83589332"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 10: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 10: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 10: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Change-Id: I4d18aa28fb2003909057954912ecbd2fc369d08f
This PR (HEAD: bfcf41b) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
Message from Mateusz Poliwczak: Patch Set 11: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 11: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-08-31T18:24:50Z","revision":"4c57c7c00e11bcf1f326fdac73e57077a23e0bba"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 11: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 11: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 11: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Robert Griesemer: Patch Set 11: (7 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
This PR (HEAD: 9833b87) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/609077. Important tips:
|
Message from Mateusz Poliwczak: Patch Set 12: Commit-Queue+1 (7 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 12: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-09-04T07:06:14Z","revision":"12b24ff8550a0bc84cdf81b2ba3d5af288fa4fa3"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 12: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Mateusz Poliwczak: Patch Set 12: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 12: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 12: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Robert Griesemer: Patch Set 12: Auto-Submit+1 Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 12: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-09-04T22:31:39Z","revision":"12b24ff8550a0bc84cdf81b2ba3d5af288fa4fa3"} Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Robert Griesemer: Patch Set 12: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
Message from Go LUCI: Patch Set 12: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/609077. |
This change makes sure that we do not format comments as doc comments inside of a declaration and makes the go doc formatter idempotent: Previously: // test comment //go:directive2 // test comment func main() { } was formatted to: // test comment //go:directive2 // test comment func main() { } after another formatting, it got formatted with doc rules into: // test comment // test comment // //go:directive2 func main() { } With this change it gets directly to the correct form (last one). Change-Id: Id7d8f03e43474357cd714e0672e886652c3fce86 GitHub-Last-Rev: 9833b87 GitHub-Pull-Request: #69134 Reviewed-on: https://go-review.googlesource.com/c/go/+/609077 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
This PR is being closed because golang.org/cl/609077 has been merged. |
This change makes sure that we do not format comments
as doc comments inside of a declaration and makes the
go doc formatter idempotent:
Previously:
func main() {
}
was formatted to:
// test comment
//go:directive2
// test comment
func main() {
}
after another formatting, it got formatted with doc rules into:
// test comment
// test comment
//
//go:directive2
func main() {
}
With this change it gets directly to the correct form (last one).