Skip to content

v1.54.0 warns about using plugins using the old API #4001

@pohly

Description

@pohly

Welcome

Description of the problem

In Kubernetes we need to update golangci-lint to 1.54.0 to support Go 1.21 and also need to backport that update to older release branches, ideally without any other unnecessary changes. Older branches have to be updated to stay on a supported Go release. In particular we would prefer to not update the version of logcheck, the custom plugin that Kubernetes is using.

This currently leads to this warning on every invocation, which happens multiple times for different modules:

 ERROR: level=warning msg="plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: https://golangci-lint.run/contributing/new-linters/#create-a-plugin"

It would be nice to give users a bit more time to upgrade plugins before warning about them. Can this warning be removed from v1.54.x and be enabled again in 1.55.x?

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version v1.54.0 built with go1.21.0 from (unknown, mod sum: "h1:sWD8sCmlWRZYj7I0VZLwX7uYfjIcIUHq8rSO4IJtzdw=") on (unknown)

Configuration

https://github.com/kubernetes/kubernetes/blob/18c3c7efb3bcccd84cccc7dacc01f0a7427b8eb9/hack/golangci.yaml#L1-L60

Go environment

$ go version && go env
go version go1.21.0 linux/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/pohly/.cache/go-build'
GOENV='/home/pohly/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/nvme/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/nvme/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/nvme/gopath/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.21.0.linux.amd64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/nvme/gopath/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.21.0.linux.amd64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/nvme/gopath/src/k8s.io/kubernetes/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1184767112=/tmp/go-build -gno-record-gcc-switches'

Verbose output of running

$ kubernetes$ hack/verify-golangci-lint.sh ./pkg/routes
go version go1.21.0 linux/amd64
installing golangci-lint and logcheck plugin from hack/tools into /nvme/gopath/src/k8s.io/kubernetes/_output/local/bin
running env LOGCHECK_CONFIG=/nvme/gopath/src/k8s.io/kubernetes/hack/logcheck.conf /nvme/gopath/src/k8s.io/kubernetes/_output/local/bin/golangci-lint run --config=/nvme/gopath/src/k8s.io/kubernetes/hack/golangci.yaml --color=always ./pkg/routes
ERROR: level=warning msg="plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: https://golangci-lint.run/contributing/new-linters/#create-a-plugin"
Congratulations! All files are passing lint :-)

Code example or link to a public repository

https://github.com/kubernetes/kubernetes/tree/master

Validation

  • Yes, I've included all information above (version, config, etc.).

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglinter: customAbout custom/private linters

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions