Skip to content

Panics with go1.19 #3053

Closed
Closed
@maxatome

Description

@maxatome

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

With go1.18.3 installed, golangci-lint works well:

> go version; golangci-lint version
go version go1.18.3 linux/amd64
golangci-lint has version 1.47.2 built from 61673b34 on 2022-07-21T10:53:45Z

With go1.19 installed, the same golangci-lint panics after ~14 secs:

> go version; golangci-lint version
go version go1.19 linux/amd64
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/[email protected]/checkers/embedded_rules.go:47 +0x4b4

Version of golangci-lint

$ golangci-lint version
golangci-lint has version 1.47.2 built from 61673b34 on 2022-07-21T10:53:45Z

Configuration file

none

Go environment

$ go version && go env
go version go1.19 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/xxx/.cache/go-build"
GOENV="/home/xxx/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/xxx/zz/go/pkg/mod"
GOOS="linux"
GOPATH="/home/xxx/Projet/go"
GOROOT="/home/xxx/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/xxx/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/xxx/wd/go-testdeep/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2144936495=/tmp/go-build -gno-record-gcc-switches"

Verbose output of running

$ 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/[email protected]/checkers/embedded_rules.go:47 +0x4b4
$ 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/[email protected]/checkers/embedded_rules.go:47 +0x4b4

Code example or link to a public repository

anywhere as golangci-lint version alone panics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions