You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
golangci-lint has multiple errors with 1.18rc1 - I've copied the first below, along with a minimal reproducible file
Version of golangci-lint
$ golangci-lint --versiongolangci-lint has version v1.44.2 built from (unknown, mod sum: "h1:MzvkDt1j1OHkv42/feNJVNNXRFACPp7aAWBWDo5aYQw=") on (unknown)
Configuration file
Empty:
$ cat .golangci.yml
Go environment
$ go version && go envgo version go1.18rc1 darwin/amd64GO111MODULE="on"GOARCH="amd64"GOBIN="/Users/alice/go/bin"GOCACHE="/Users/alice/Library/Caches/go-build"GOENV="/Users/alice/Library/Application Support/go/env"GOEXE=""GOEXPERIMENT=""GOFLAGS=""GOHOSTARCH="amd64"GOHOSTOS="darwin"GOINSECURE=""GOMODCACHE="/Users/alice/go/pkg/mod"GONOPROXY="github.com/bufdev"GONOSUMDB="github.com/bufdev"GOOS="darwin"GOPATH="/Users/alice/go"GOPRIVATE="github.com/bufdev"GOPROXY="https://proxy.golang.org,direct"GOROOT="/Users/alice/.cache/gimme/versions/go1.18rc1.darwin.amd64"GOSUMDB="sum.golang.org"GOTMPDIR=""GOTOOLDIR="/Users/alice/.cache/gimme/versions/go1.18rc1.darwin.amd64/pkg/tool/darwin_amd64"GOVCS=""GOVERSION="go1.18rc1"GCCGO="gccgo"GOAMD64="v1"AR="ar"CC="clang"CXX="clang++"CGO_ENABLED="1"GOMOD="/Users/alice/tmp/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gl/rk7vtj290lx0pq64kdtasd24lknlnkasdv/T/go-build3199327674=/tmp/go-build -gno-record-gcc-switches -fno-common"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -vINFO [config_reader] Config search paths: [./ /Users/alice/tmp /Users/alice /Users /]INFO [config_reader] Used config file .golangci.ymlINFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck]INFO [loader] Go packages loading at mode 575 (deps|exports_file|files|types_sizes|compiled_files|imports|name) took 26.218852msINFO [runner/filename_unadjuster] Pre-built 0 adjustments in 159.637µsINFO [linters context/goanalysis] analyzers took 80.98404ms with top 10 stages: ctrlflow: 1.952209ms, fact_deprecated: 1.946466ms, S1016: 1.673439ms, testinggoroutine: 1.656626ms, SA1005: 1.647715ms, S1001: 1.647116ms, SA3000: 1.644546ms, S1005: 1.642674ms, S1035: 1.641256ms, SA4025: 1.638109msERRO [runner] Panic: S1029: package "foo" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildir.IR: goroutine 739 [running]:runtime/debug.Stack() /Users/alice/.cache/gimme/versions/go1.18rc1.darwin.amd64/src/runtime/debug/stack.go:24 +0x65github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1() /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/golinters/goanalysis/runner_action.go:101 +0x155panic({0x4b74ee0, 0xc0007f7980}) /Users/alice/.cache/gimme/versions/go1.18rc1.darwin.amd64/src/runtime/panic.go:838 +0x207honnef.co/go/tools/internal/sharedcheck.CheckRangeStringRunes(0xc000989790) /Users/alice/go/pkg/mod/honnef.co/go/tools@v0.2.2/internal/sharedcheck/lint.go:23 +0x17bhonnef.co/go/tools/simple.CheckRangeStringRunes(0x4b568e0?) /Users/alice/go/pkg/mod/honnef.co/go/tools@v0.2.2/simple/lint.go:1513 +0x19github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc0009b6870) /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/golinters/goanalysis/runner_action.go:187 +0x9c4github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2() /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/golinters/goanalysis/runner_action.go:105 +0x1dgithub.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc000291590, {0x4c8bc78, 0x5}, 0xc000a4ff48) /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/timeutils/stopwatch.go:111 +0x4agithub.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0x61747369726b2220?) /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/golinters/goanalysis/runner_action.go:104 +0x85github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc0009b6870) /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze /Users/alice/go/pkg/mod/github.com/golangci/golangci-lint@v1.44.2/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x1ebWARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: S1029: package "foo" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildir.IRINFO [runner] processing took 10.561µs with stages: max_same_issues: 5.269µs, skip_dirs: 672ns, max_from_linter: 570ns, nolint: 466ns, cgo: 336ns, path_prettifier: 281ns, autogenerated_exclude: 279ns, filename_unadjuster: 279ns, skip_files: 274ns, uniq_by_line: 272ns,exclude: 264ns, diff: 258ns, sort_results: 201ns, source_code: 177ns, max_per_file_from_linter: 167ns, path_shortener: 164ns, identifier_marker: 162ns, path_prefixer: 159ns, severity-rules: 157ns, exclude-rules: 154nsINFO [runner] linters took 429.205195ms with stages: goanalysis_metalinter: 429.102871msERRO Running error: 1 error occurred: * can't run linter goanalysis_metalinter: goanalysis_metalinter: S1029: package "foo" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildir.IRINFO Memory: 6 samples, avg is 46.7MB, max is 46.8MBINFO Execution took 467.281798ms
Welcome
Description of the problem
golangci-lint has multiple errors with 1.18rc1 - I've copied the first below, along with a minimal reproducible file
Version of golangci-lint
Configuration file
Empty:
$ cat .golangci.yml
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: