-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
contextcheck: panic with runtime error #3048
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, can you provide a minimal reproducible code example? Currently, I recommend disabling |
@ldez not sure about minimal, but here's a gh-actions run on small OSS codebase (about 5k lines of go code in total) that triggers this https://github.com/arriven/db1000n/runs/7636407897?check_suite_focus=true |
@arriven thank you 👍 Yes, it's not minimal but it's a public repo so I think I will be able to work with that. |
Reproduced, but another error: $ go version
go version go1.21.0 darwin/arm64
$ golangci-lint version
golangci-lint has version 1.54.0 built with go1.21.0 from c1d8c565 on 2023-08-09T11:50:00Z
$ pwd
/tmp/db1000n
$ go clean -modcache
$ go mod tidy
$ ▶ golangci-lint run --disable-all --enable contextcheck ./...
ERRO Running error: 1 error occurred:
* can't run linter goanalysis_metalinter: buildssa: failed to load package mapstructure: could not load export data: no export data for "github.com/mitchellh/mapstructure" Related to #1920 |
go1.20 and golangci-lint v1.54.0 => no panic/go/db1000n # $ docker run --rm -it golang:1.20-alpine sh
/go # apk add -q git curl
/go # curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.0
golangci/golangci-lint info checking GitHub for tag 'v1.54.0'
golangci/golangci-lint info found version: 1.54.0 for v1.54.0/linux/amd64
golangci/golangci-lint info installed /go/bin/golangci-lint
/go # golangci-lint version
golangci-lint has version 1.54.0 built with go1.21.0 from c1d8c565 on 2023-08-09T11:50:00Z
/go # go version
go version go1.20.13 linux/amd64
/go # git clone --quiet https://github.com/arriven/db1000n.git && cd db1000n/
/go/db1000n # git config --global core.pager "more"
/go/db1000n # git log -1 --oneline
d4f0eb7 (HEAD -> main, tag: v0.9.22, origin/main, origin/HEAD) add more arm targets
/go/db1000n # go mod tidy
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
...
go: downloading github.com/kr/text v0.1.0
/go/db1000n # golangci-lint run --no-config --disable-all --enable contextcheck go1.20 and golangci-lint v1.55.2 => no panic$ docker run --rm -it golang:1.20-alpine sh
/go # apk add -q git curl
/go # curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
golangci/golangci-lint info checking GitHub for tag 'v1.55.2'
golangci/golangci-lint info found version: 1.55.2 for v1.55.2/linux/amd64
golangci/golangci-lint info installed /go/bin/golangci-lint
/go # golangci-lint version
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T12:59:25Z
/go # go version
go version go1.20.13 linux/amd64
/go # git clone --quiet https://github.com/arriven/db1000n.git && cd db1000n/
/go/db1000n # git config --global core.pager "more"
/go/db1000n # git log -1 --oneline
d4f0eb7 (HEAD -> main, tag: v0.9.22, origin/main, origin/HEAD) add more arm targets
/go/db1000n # go mod tidy
go: downloading go.uber.org/zap v1.21.0
...
go: downloading github.com/kr/text v0.1.0
/go/db1000n # golangci-lint run --no-config --disable-all --enable contextcheck
/go/db1000n # go1.21 and golangci-lint v1.55.2 => no panic$ docker run --rm -it golang:1.21-alpine sh
/go # apk add -q git curl
/go # curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
golangci/golangci-lint info checking GitHub for tag 'v1.55.2'
golangci/golangci-lint info found version: 1.55.2 for v1.55.2/linux/amd64
golangci/golangci-lint info installed /go/bin/golangci-lint
/go # golangci-lint version
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T12:59:25Z
/go # go version
go version go1.21.6 linux/amd64
/go # git clone --quiet https://github.com/arriven/db1000n.git && cd db1000n/
/go/db1000n # git config --global core.pager "more"
/go/db1000n # git log -1 --oneline
d4f0eb7 (HEAD -> main, tag: v0.9.22, origin/main, origin/HEAD) add more arm targets
/go/db1000n # go mod tidy
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
...
go: downloading github.com/kr/text v0.1.0
/go/db1000n # golangci-lint run --no-config --disable-all --enable contextcheck
/go/db1000n # |
Welcome
Description of the problem
I got this error when I ran golangci-lint in the CircleCI's official image cimg/go:1.8. Then I tried to use image
golangci/golangci-lint:v1.47.3
to run it, I got the same error.Version of golangci-lint
golangci-lint has version 1.47.3 built from d186efe on 2022-08-01T11:01:02Z
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
N/A (private repo)
The text was updated successfully, but these errors were encountered: