[ 
https://issues.apache.org/jira/browse/THRIFT-5969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077952#comment-18077952
 ] 

Yuxuan Wang edited comment on THRIFT-5969 at 5/4/26 12:45 AM:
--------------------------------------------------------------

Now I see that this ticket is a child of adding static code analysis for all 
languages. There are 2 more things we could have added to go but I chose not 
to, let me record my rationales here for future reference:
1. `go vet`: This is already done in `make check` in the build workflow. We 
could also add it to SCA, but there's one caveat we need to also copy to the 
SCA workflow if we do that: 
https://github.com/apache/thrift/blob/c1710f06e13d8db9729f715a858e68df092ae14f/lib/go/Makefile.am#L39-L40
2. `staticcheck`: Currently our code is 
[staticcheck|https://staticcheck.dev/]-compliant, and SCA workflow does make it 
easier to introduce third-party linters than before (build). But one minor 
issue with staticcheck is that when there's a new go minor version release, 
there are usually a one to two week period staticcheck will have compatibility 
issues, until staticcheck releases a new version. This happened in several of 
the last few go releases, so enforcing it in CI will delay our ability to 
update our updated go versions following go releases.


was (Author: fishywang):
Now I see that this ticket is a child of adding static code analysis for all 
languages. There are 2 more thing we could have added to go but I chose not to, 
let me record my rationales here for future reference:
1. `go vet`: This is already done in `make check` in the build workflow. We 
could also add it to SCA, but there's one caveat we need to also copy to the 
SCA workflow if we do that: 
https://github.com/apache/thrift/blob/c1710f06e13d8db9729f715a858e68df092ae14f/lib/go/Makefile.am#L39-L40
2. `staticcheck`: Currently our code is 
[staticcheck|https://staticcheck.dev/]-compliant, and SCA workflow does make it 
easier to introduce third-party linters than before (build). But one minor 
issue with staticcheck is that when there's a new go minor version release, 
there are usually a one to two week period staticcheck will have compatibility 
issues, until staticcheck releases a new version. This happened in several of 
the last few go releases, so enforcing it in CI will delay our ability to 
update our updated go versions following go releases.

> Introduce gofmt 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
>            Assignee: Yuxuan Wang
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to