go-critic: Panic after upgrade golangci-lint to v1.43.0

Hello!

panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.9()
        github.com/go-critic/go-critic@v0.6.1/checkers/checkers.go:58 +0x4b4

For any golangci-lint command 😦

I can’t provide source code, but can provide information about env:

$ uname -a
Darwin MacBook-Pro.local 20.6.0
Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021;
root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64

$ golangci-lint --version
golangci-lint has version 1.43.0 built from 861262b on 2021-11-02T20:54:42Z

$ go version
go1.17.1 darwin/arm64
go env
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN="/Users/anthony/golang_workspace/bin"
GOCACHE="/Users/anthony/Library/Caches/go-build"
GOENV="/Users/anthony/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/anthony/golang_workspace/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/anthony/golang_workspace"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.17.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6t/v80c8sfs5zqf38b2yhzq592h0000gn/T/go-build838314483=/tmp/go-build -gno-record-gcc-switches -fno-common

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 6
  • Comments: 15 (7 by maintainers)

Most upvoted comments

I’ve got exactly the same error message after upgrading to Go 1.18beta1. See https://github.com/golangci/golangci-lint/issues/2414 It was fine with Go 1.17.5

@cristaloleg, please, look at the first message, go env at the bottom.

Could you try with newer golangci-lint release?

I’ll try to reproduce it.

Oh…

It was really about the env and arch. I have written in more detail in the related issue. Thanks!