[
https://issues.apache.org/jira/browse/THRIFT-5969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077927#comment-18077927
]
Yuxuan Wang commented on THRIFT-5969:
-------------------------------------
If you mean the thrift compiler generated go code doesn't follow `gofmt`,
that's kind of intentional. That would require either we do a lot of work in
the compiler code to carefully mimic what gofmt would do, or run `gofmt` from
compiler, which has the issues of: 1) THRIFT-3893; 2) users without go
toolchain installed would have more trouble running thrift compiler to generate
go code. So as a result, we just leave this to the user: they can either run
gofmt themselves after thrift compiler, or exclude those files from their gofmt
enforcement
([example|https://github.com/reddit/baseplate.go/blob/653f6536bac22574f4aad9cc3d6ab3618039f943/scripts/linters.sh#L6]).
> Introduce golangci-lint for Go library
> --------------------------------------
>
> Key: THRIFT-5969
> URL: https://issues.apache.org/jira/browse/THRIFT-5969
> Project: Thrift
> Issue Type: Task
> Components: Go - Library
> Reporter: Dmytro Shteflyuk
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)