Skip to content

After Perfsprint Analyzer got updated, building the linter doesn't work anymore #4161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 tasks done
mdonkers opened this issue Oct 25, 2023 · 1 comment · Fixed by #4157
Closed
5 tasks done

After Perfsprint Analyzer got updated, building the linter doesn't work anymore #4161

mdonkers opened this issue Oct 25, 2023 · 1 comment · Fixed by #4157
Labels
bug Something isn't working dependencies Relates to an upstream dependency

Comments

@mdonkers
Copy link

Welcome

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 here

Go 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 here

A minimal reproducible example or link to a public repository

// add your code here

Validation

  • Yes, I've included all information above (version, config, etc.).
@mdonkers mdonkers added the bug Something isn't working label Oct 25, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 25, 2023

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added the dependencies Relates to an upstream dependency label Oct 25, 2023
sni added a commit to ConSol-Monitoring/snclient that referenced this issue Oct 26, 2023
@ldez ldez closed this as completed in #4157 Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Relates to an upstream dependency
Projects
None yet
2 participants