Closed
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 included all information below (version, config, etc).
- Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)
Description of the problem
golangci-lint version 1.45.0 on linux arm64/aarch64 with go1.17.8 fails with this error
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
github.com/go-critic/go-critic@v0.6.2/checkers/embedded_rules.go:46 +0x488
golangci-lint version 1.45.0 works just fine on amd64 with go1.17.8, as well as arm64 with go1.18
Here's the whole process
$ docker run -it --rm --entrypoint /bin/bash golang:1.17
root@eb266021b73c:/go# uname -m
aarch64
root@eb266021b73c:/go# go version
go version go1.17.8 linux/arm64
root@eb266021b73c:/go# curl -SsLO https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-linux-arm64.tar.gz
root@eb266021b73c:/go# tar -xf golangci-lint-1.45.0-linux-arm64.tar.gz
root@eb266021b73c:/go# golangci-lint-1.45.0-linux-arm64/golangci-lint
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
github.com/go-critic/go-critic@v0.6.2/checkers/embedded_rules.go:46 +0x488
root@eb266021b73c:/go#
Version of golangci-lint
root@eb266021b73c:/go# golangci-lint-1.45.0-linux-arm64/golangci-lint --version
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
github.com/go-critic/go-critic@v0.6.2/checkers/embedded_rules.go:46 +0x488
root@eb266021b73c:/go#
Configuration file
root@eb266021b73c:/go# cat .golangci.yml
cat: .golangci.yml: No such file or directory
root@eb266021b73c:/go#
Go environment
root@eb266021b73c:/go# go version && go env
go version go1.17.8 linux/arm64
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GOVCS=""
GOVERSION="go1.17.8"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build850424411=/tmp/go-build -gno-record-gcc-switches"
root@eb266021b73c:/go#
Verbose output of running
root@eb266021b73c:/go# golangci-lint-1.45.0-linux-arm64/golangci-lint cache clean
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
github.com/go-critic/go-critic@v0.6.2/checkers/embedded_rules.go:46 +0x488
root@eb266021b73c:/go# golangci-lint-1.45.0-linux-arm64/golangci-lint run -v
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
github.com/go-critic/go-critic@v0.6.2/checkers/embedded_rules.go:46 +0x488
root@eb266021b73c:/go#
Code example or link to a public repository
N/A error occurs before running the linters, no code is being linted