-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't workingdependenciesRelates to an upstream dependencyRelates to an upstream dependency
Description
Welcome
- Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've read the typecheck section of the FAQ (https://golangci-lint.run/usage/faq/#why-do-you-have-typecheck-errors).
- Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)
Description of the problem
Perfsprint linter got updated, which breaks current usage. Before it had a Analyzer instance defined:
https://github.com/catenacyber/perfsprint/blob/18f87061773e90f98fd9d24a3f0dbebc9f23bab7/analyzer/analyzer.go#L17
With version 0.3.0, this got replace by the New() method:
https://github.com/catenacyber/perfsprint/blob/fc24f10e1bd98e69c4e44fd8019309e6199459e9/analyzer/analyzer.go#L26
Including tools such as e.g. OpenTelemetry Collector has (https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/baf4ccef1abfc46b048930f0272cc1112ebd45d6/internal/tools/go.mod#L8) will then fail the build with:
$ go build -o collector/.tools/golangci-lint -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint
# github.com/golangci/golangci-lint/pkg/golinters
/home/miel/.go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/perfsprint.go:11:16: undefined: analyzer.Analyzer
Version of golangci-lint
$ golangci-lint --version
[email protected]Configuration
# paste configuration file or CLI flags hereGo environment
$ go version && go env
go version go1.21.1 linux/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/miel/.cache/go-build'
GOENV='/home/miel/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/miel/.go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/miel/.go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='collector/internal/tools/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 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1880704451=/tmp/go-build -gno-record-gcc-switches'
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
# paste output hereA minimal reproducible example or link to a public repository
// add your code hereValidation
- Yes, I've included all information above (version, config, etc.).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdependenciesRelates to an upstream dependencyRelates to an upstream dependency