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
I ran the linter on the chconn repo
https://github.com/vahid-sohrabloo/chconn
ERRO [runner] Panic: bodyclose: package "column" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA: goroutine 4598 [running]:
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 1.48.0 built from 2d8fea81 on 2022-08-04T18:44:38Z
Configuration file
https://github.com/vahid-sohrabloo/chconn/blob/master/.golangci.yml
Go environment
$ go version && go env
go version go1.19 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vahid/.cache/go-build"
GOENV="/home/vahid/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/vahid/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/vahid/go/"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/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/vahid/projects/chconn/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-build4032773505=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /home/vahid/projects/chconn /home/vahid/projects /home/vahid /home /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 34 linters: [bodyclose deadcode depguard dogsled dupl errcheck exhaustive exportloopref funlen gochecknoinits goconst gocyclo gofmt goimports goprintffuncname gosec gosimple govet ineffassign lll misspell nakedret noctx nolintlint rowserrcheck staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace]
INFO [loader] Go packages loading at mode 575 (name|types_sizes|deps|exports_file|files|imports|compiled_files) took 179.300672ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 10.870585ms
INFO [linters context/goanalysis] analyzers took 16.87277408s with top 10 stages: buildir: 4.849183866s, buildssa: 812.739013ms, exhaustive: 546.392954ms, goimports: 339.224849ms, dupl: 337.786451ms, ctrlflow: 330.048343ms, S1038: 286.6035ms, printf: 271.590213ms, inspect: 250.197768ms, gosec: 239.14859ms
ERRO [runner] Panic: bodyclose: package "column" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA: goroutine 4365 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x65
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:101 +0x155
panic({0xf60400, 0xc008742030})
runtime/panic.go:884 +0x212
github.com/timakin/bodyclose/passes/bodyclose.runner.run({0xc005c0e0d0, {0x0, 0x0}, 0x0, {0x0, 0x0}, 0x0, 0x0}, 0xc005c0e0d0)
github.com/timakin/bodyclose@v0.0.0-20210704033933-f49887972144/passes/bodyclose/bodyclose.go:45 +0x697
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc003058240)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:187 +0x9d6
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:105 +0x1d
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001812eb0, {0x109e6c7, 0x9}, 0xc002f01748)
github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x4a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc002f017d0?)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:104 +0x85
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc003058240)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x1eb
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: bodyclose: package "column" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA
WARN [linters context] rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
INFO [runner] processing took 3.818µs with stages: max_same_issues: 694ns, skip_dirs: 424ns, nolint: 375ns, max_from_linter: 315ns, cgo: 184ns, skip_files: 177ns, filename_unadjuster: 175ns, path_prettifier: 173ns, uniq_by_line: 170ns, max_per_file_from_linter: 164ns, autogenerated_exclude: 163ns, exclude: 162ns, sort_results: 96ns, source_code: 88ns, path_shortener: 82ns, identifier_marker: 80ns, severity-rules: 77ns, diff: 75ns, exclude-rules: 72ns, path_prefixer: 72ns
INFO [runner] linters took 2.283858849s with stages: goanalysis_metalinter: 2.283777236s, rowserrcheck: 10.856µs, structcheck: 8.397µs
ERRO Running error: 1 error occurred:
* can't run linter goanalysis_metalinter: goanalysis_metalinter: bodyclose: package "column" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA
INFO Memory: 26 samples, avg is 302.5MB, max is 478.0MB
INFO Execution took 2.485115988s