slachiewicz opened a new pull request, #3921: URL: https://github.com/apache/thrift/pull/3921
gofmt rewrites a doc comment that starts or ends with an empty line, or holds two in a row, so an IDL doc comment of that shape produced Go that fails the gofmt check from THRIFT-6011. `generate_go_docstring_comment` now drops the empty lines at either end and keeps one of a run, which is what gofmt does. `lib/go/test/DocCommentTest.thrift` holds the shapes, so the gofmt run over the generated code in the sca workflow covers them. Verified: regenerating every `.thrift` under `lib/go/test`, `test`, `tutorial`, `contrib`, `compiler/cpp/tests/cpp` and `lib/java/src/test/resources` with `-r --gen go` before and after → 751 files, 1 changes raw (the fixture-shaped edge case), all 751 equal `gofmt` of the previous output; `gofmt -l` over the new output → 0 files (previously 1). - [ ] ~~Did you create an Apache Jira ticket?~~ Trivial change, no ticket. - [x] Squashed to a single commit. - [x] No breaking change: generated code differs only where gofmt would already have rewritten it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
