gci icon indicating copy to clipboard operation
gci copied to clipboard

Regression in golangci-lint

Open howardjohn opened this issue 2 years ago • 4 comments

We recently update golangci-lint and it broke gci, forcing us to disable it.

To reproduce:

https://github.com/istio/istio/commit/3a245f843d38a5598b171a18422a09b4b1ba0802

$ golangci-lint run --fix -c ./common/config/.golangci-format.yml istioctl/pkg/util/proto/messageslice.go
istioctl/pkg/util/proto/messageslice.go:21:1: Expected '\t', Found '\n' at istioctl/pkg/util/proto/messageslice.go[line 21,col 1] (gci)

^

Can also run in our docker build:

./common/scripts/run.sh golangci-lint run --fix -c ./common/config/.golangci-format.yml istioctl/pkg/util/proto/messageslice.go

howardjohn avatar May 25 '22 15:05 howardjohn

@howardjohn thanks for the report! Now, which version of golangci-lint do you use? I will investigate that version first.

daixiang0 avatar May 30 '22 01:05 daixiang0

@howardjohn thanks for the report! Now, which version of golangci-lint do you use? I will investigate that version first.

reproduce at golangci-lint 1.46.2

ivila avatar May 31 '22 11:05 ivila

https://github.com/golangci/golangci-lint/pull/2892 I think need to wait next fix version.

daixiang0 avatar May 31 '22 22:05 daixiang0

@howardjohn @ivila please wait for the next release, 1.46.2 is released on May 17, but the fix PR is merged on May 31.

daixiang0 avatar Jul 06 '22 07:07 daixiang0