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 read the typecheck section of the FAQ (https://golangci-lint.run/usage/faq/#why-do-you-have-typecheck-errors).
- Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)
Description of the problem
Pull the latest code and use make build. It cannot be exploded accordingly.
GoLang Version: 1.21.8
golangci-lint Version: latest master make build
Version of golangci-lint
$ golangci-lint --version
# Paste output here
golangci-lint has version (devel) built with go1.21.8 from (unknown, mod sum: "") on (unknown)
Configuration
# paste configuration file or CLI flags here
Go environment
$ go version && go env
# paste output here
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here
INFO [config_reader] Config search paths: [./]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 10 linters: [errcheck forbidigo goimports gosimple govet ineffassign misspell staticcheck unused whitespace]
INFO [loader] Go packages loading at mode 575 (name|types_sizes|compiled_files|deps|exports_file|files|imports) took 896.459292ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 70.753584ms
INFO [linters_context/goanalysis] analyzers took 2m9.91934941s with top 10 stages: buildir: 14.901529871s, goimports: 5.670117284s, forbidigo: 5.642568598s, S1038: 2.781328369s, whitespace: 2.665187295s, directives: 2.568707869s, misspell: 2.506498657s, unused: 2.399164374s, isgenerated: 2.154990296s, errcheck: 1.803361748s
ERRO [runner] Panic: httpresponse: package "chatroom" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference: goroutine 54483 [running]:
runtime/debug.Stack()
/Users/jesse/.gvm/gos/go1.21.8/src/runtime/debug/stack.go:24 +0x64
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/Users/jesse/GolandProjects/golangci-lint/pkg/golinters/goanalysis/runner_action.go:108 +0x224
panic({0x101d79820?, 0x10271c140?})
/Users/jesse/.gvm/gos/go1.21.8/src/runtime/panic.go:914 +0x218
go/types.(*Named).Obj(...)
/Users/jesse/.gvm/gos/go1.21.8/src/go/types/named.go:295
golang.org/x/tools/go/analysis/passes/internal/analysisutil.IsNamedType({0x101ee5460?, 0x0?}, {0x1019b7503?, 0x100efaff4?}, {0x140046beab8?, 0x1?, 0x140046beb68?})
/Users/jesse/.gvm/pkgsets/go1.21.8/global/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/internal/analysisutil/util.go:123 +0x38
golang.org/x/tools/go/analysis/passes/httpresponse.isHTTPFuncOrMethodOnClient(0x140192e1810, 0x1?)
/Users/jesse/.gvm/pkgsets/go1.21.8/global/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/httpresponse/httpresponse.go:122 +0x144
golang.org/x/tools/go/analysis/passes/httpresponse.run.func1({0x101ee4830?, 0x1400f49d6c0?}, 0x68?, {0x1401a49a400, 0x5, 0x10})
/Users/jesse/.gvm/pkgsets/go1.21.8/global/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/httpresponse/httpresponse.go:62 +0x58
golang.org/x/tools/go/ast/inspector.(*Inspector).WithStack(0x140085c6420, {0x140046bec88?, 0x1?, 0x14000e8a0f0?}, 0x14003033c98)
/Users/jesse/.gvm/pkgsets/go1.21.8/global/pkg/mod/golang.org/x/tools@v0.19.0/go/ast/inspector/inspector.go:148 +0x168
golang.org/x/tools/go/analysis/passes/httpresponse.run(0x1401b9396c0)
/Users/jesse/.gvm/pkgsets/go1.21.8/global/pkg/mod/golang.org/x/tools@v0.19.0/go/analysis/passes/httpresponse/httpresponse.go:57 +0x104
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0x140054888b0)
/Users/jesse/GolandProjects/golangci-lint/pkg/golinters/goanalysis/runner_action.go:190 +0x99c
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/Users/jesse/GolandProjects/golangci-lint/pkg/golinters/goanalysis/runner_action.go:112 +0x20
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0x14001d4c190, {0x101a01a2d, 0xc}, 0x14004472730)
/Users/jesse/GolandProjects/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0x1013975c0?)
/Users/jesse/GolandProjects/golangci-lint/pkg/golinters/goanalysis/runner_action.go:111 +0x78
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0x140054888b0)
/Users/jesse/GolandProjects/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb0
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze in goroutine 403
/Users/jesse/GolandProjects/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x184
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: httpresponse: package "chatroom" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference
INFO [runner] processing took 1.292µs with stages: max_same_issues: 500ns, skip_dirs: 166ns, cgo: 125ns, path_prefixer: 42ns, severity-rules: 42ns, identifier_marker: 42ns, autogenerated_exclude: 42ns, path_prettifier: 42ns, diff: 42ns, max_from_linter: 42ns, sort_results: 42ns, source_code: 42ns, skip_files: 41ns, uniq_by_line: 41ns, nolint: 41ns, fixer: 0s, exclude-rules: 0s, filename_unadjuster: 0s, exclude: 0s, max_per_file_from_linter: 0s, path_shortener: 0s
INFO [runner] linters took 4.73555075s with stages: goanalysis_metalinter: 4.735327791s
ERRO Running error: can't run linter goanalysis_metalinter
goanalysis_metalinter: httpresponse: package "chatroom" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference
INFO Memory: 59 samples, avg is 533.3MB, max is 936.1MB
INFO Execution took 5.711658375s
A minimal reproducible example or link to a public repository
// add your code here
Validation
- Yes, I've included all information above (version, config, etc.).