We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to upgrade from 1.5 to 1.7.1, I've run into this:
$ golangci-lint run -c ../../.golangci.toml ./... WARN [runner] Panic stack trace: goroutine 1486 [running]: runtime/debug.Stack(0x180a3e1, 0x11, 0xc4322a52a0) /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 github.com/golangci/golangci-lint/pkg/lint.Runner.runLinterSafe.func1(0xc4322a5ba8, 0xc432a21b80, 0xb, 0xb, 0x18c5ba0, 0xc42e5eac40) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/lint/runner.go:73 +0xbc panic(0x171d220, 0x1cd5500) /usr/local/go/src/runtime/panic.go:502 +0x229 github.com/golangci/golangci-lint/vendor/github.com/golangci/govet.doPackage(0x0, 0xc420d22000, 0xc42016cb00, 0x0, 0x0, 0x0, 0xc43dcdf860, 0x0, 0x0) /Users/denis/go/src/github.com/golangci/golangci-lint/vendor/github.com/golangci/govet/main.go:452 +0xc08 github.com/golangci/golangci-lint/vendor/github.com/golangci/govet.Analyze(0x0, 0x0, 0x0, 0xc42016cb00, 0xc420d22000, 0x0, 0x1, 0x1, 0x1, 0x0, ...) /Users/denis/go/src/github.com/golangci/golangci-lint/vendor/github.com/golangci/govet/golangci.go:41 +0x26b github.com/golangci/golangci-lint/pkg/golinters.Govet.runOnSourcePackages(0x18c3340, 0xc420164c00, 0xc432d7b140, 0xc42ce0fc20, 0xc, 0xc42ce0fc20, 0xc, 0xc) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/golinters/govet.go:219 +0x166 github.com/golangci/golangci-lint/pkg/golinters.Govet.Run(0x18c3340, 0xc420164c00, 0xc432d7b140, 0x10106e8, 0xc4207c6980, 0xc42002f0e0, 0x17f474a, 0xc42e5ead60) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/golinters/govet.go:40 +0x436 github.com/golangci/golangci-lint/pkg/lint.Runner.runLinterSafe(0xc432a21b80, 0xb, 0xb, 0x18c5ba0, 0xc42e5eac40, 0x18c3340, 0xc420164c00, 0xc432d7af60, 0x18c2500, 0x1d074a8, ...) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/lint/runner.go:79 +0x194 github.com/golangci/golangci-lint/pkg/lint.Runner.runWorker.func1() /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/lint/runner.go:111 +0xe9 github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc437c90370, 0x17f2ffa, 0x5, 0xc4207c6e50) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:75 +0x53 github.com/golangci/golangci-lint/pkg/lint.Runner.runWorker(0xc432a21b80, 0xb, 0xb, 0x18c5ba0, 0xc42e5eac40, 0x18c3340, 0xc420164c00, 0xc432d7af60, 0xc432d7afc0, 0xc432d7b020, ...) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/lint/runner.go:110 +0x1e4 github.com/golangci/golangci-lint/pkg/lint.(*Runner).runWorkers.func1(0xc42ce0fbf0, 0xc428af4b10, 0x18c3340, 0xc420164c00, 0xc432d7af60, 0xc432d7afc0, 0xc432d7b020, 0xc422b02300, 0x8, 0x8, ...) /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/lint/runner.go:165 +0x152 created by github.com/golangci/golangci-lint/pkg/lint.(*Runner).runWorkers /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/lint/runner.go:162 +0x1b8 WARN [runner] Can't run linter govet: panic occured: runtime error: index out of range Congrats! No issues were found.
ℹ️ Trying other versions:
⏩ The problem seems to be around a package that has only test files -- and I presume it panics here, pkg.path = astFiles[0].Name.Name.
pkg.path = astFiles[0].Name.Name
The text was updated successfully, but these errors were encountered:
Fix #122: don't crash govet on tests-only packages
c5ca486
thank you! fast fix is in #123, then I will add tests and improve it
Sorry, something went wrong.
3d426c7
Thank you 🎉
93311ae
No branches or pull requests
Trying to upgrade from 1.5 to 1.7.1, I've run into this:
ℹ️ Trying other versions:
⏩ The problem seems to be around a package that has only test files -- and I presume it panics here,
pkg.path = astFiles[0].Name.Name
.The text was updated successfully, but these errors were encountered: