sbom-cli-plugin
sbom-cli-plugin copied to clipboard
golangci-lint 1.45.0 - as referenced in Makefile - panics
What happened:
Having run make bootstrap-tools to install the requisite version of golangci-lint - 1.45.0 - into .tmp/golangci-lint other make commands lead to a panic from 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/[email protected]/checkers/embedded_rules.go:46 +0x494
In fact, merely running .tmp/golangci-lint results in the same panic.
This is due to an issue with golangci-lint itself, as per this - go-critic/ruleguard: load embedded ruleguard rules: rules/rules.go:13: can't load fmt #3107 - and occurs with versions 1.45.0, 1.46.0 and 1.47.0.
Later versions from 1.48.0 through the current latest - 1.50.1 - work OK
What you expected to happen:
make etc. that leverages golangci-lint should run to completion; also golangci-lint commands such .tmp/golangci-lint --version should just work: -
golangci-lint has version 1.50.1 built from 8926a95f on 2022-10-22T10:50:47Z
How to reproduce it (as minimally and precisely as possible):
- Clone the sbom-cli-plugin repo
- Run
make bootstrap-tools - Test the downloaded/installed version of
golangci-lintvia.tmp/golangci-lint --versionor just runmake - Watch the panic
Anything else we need to know?:
Environment:
go version
go version go1.19.4 darwin/arm64
sw_vers
ProductName: macOS
ProductVersion: 13.1
BuildVersion: 22C65
I've also reproduced the same on Ubuntu
I'll create a PR from my own fork, updating golangci-lint to the (current) latest - 1.50.1 - as per that project's releases page