-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
nil pointer dereference #622
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
Comments
Entschuldigung ich habe 2 golang go und go lint und parallel go prime app
dazu können sie anweisen bitte was ich zu löschen sohl?
yaches <notifications@github.com> schrieb am Mo., 22. Juli 2019, 20:26:
… Running linter in gilab ci
golangci-lint:v1.17
go 1.12
err log:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x99471f]
goroutine 3142 [running]:github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose.(*runner).run(0xc0000bcc40, 0xc0231add60, 0x10, 0xd1d9e0, 0x1d7, 0x1d8)
/home/travis/gopath/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:57 +0x1afgithub.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.(*action).execOnce(0xc01c98a8c0)
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:382 +0x68a
sync.(*Once).Do(0xc01c98a8c0, 0xc0003fc790)
/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/sync/once.go:44 +0xb3github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.(*action).exec(0xc01c98a8c0)
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:303 +0x50github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.execAll.func1(0xc01c98a8c0)
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:291 +0x34
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.execAll
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:297 +0x11b
Makefile:56: recipe for target 'lint' failed
make: *** [lint] Error 2
.golangci.yml:
linters:
enable-all: true
disable:
# Globals are OK
- gochecknoglobals
# So are inits
- gochecknoinits
# Cant disable some of go vet checks => disable all of them
- govet
# Useless
- interfacer
# Long lines are fine
- lll
# Using "weak" primitivies is fine when they're not used for crypto
- gosec
run:
tests: false
issues-exit-code: 0
skip-dirs:
- vendor/
skip-files:
- _test.go
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#622?email_source=notifications&email_token=AMLQJM7UXQS2SJAIQLQLY2TQAX3XHA5CNFSM4IF3LIM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HAWUG3Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMLQJM4XLH2KJQNYXIFVEELQAX3XHANCNFSM4IF3LIMQ>
.
|
I'm getting this same nil pointer dereference. My stack trace is below. OSX version 10.14.5 /usr/local/bin/golangci-lint run -c .golangci.yml ./...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1598484]
goroutine 1835 [running]:
go/types.(*object).Name(...)
/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/go/types/object.go:134
github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose.(*runner).isCloseCall(0xc00009e2c0, 0x1be0ea0, 0xc00798b700, 0xc0068132c0)
/home/travis/gopath/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:230 +0x234
github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose.(*runner).isopen(0xc00009e2c0, 0xc014b1f760, 0x9, 0xc01169dd00)
/home/travis/gopath/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:175 +0x2e9
github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose.(*runner).run(0xc00009e2c0, 0xc0000cbd60, 0x10, 0x191fec0, 0x4af2d33feb6c8001, 0xc012290720)
/home/travis/gopath/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:100 +0x641
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.(*action).execOnce(0xc00041d720)
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:382 +0x68a
sync.(*Once).Do(0xc00041d720, 0xc000a83790)
/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/sync/once.go:44 +0xb3
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.(*action).exec(0xc00041d720)
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:303 +0x50
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.execAll.func1(0xc00041d720)
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:291 +0x34
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.execAll
/home/travis/gopath/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker/checker.go:297 +0x11b
Process finished with exit code 2 |
I just noticed that this is also found in #608 too, so we should probably collect the issue in one spot. I'll be copying over my last comment with error details to there as well. |
Community suggestion: to help things as clear as possible for when the project picks up again it might be useful to close your issue as it seems the discussion has been transferred to the duplicate issue. 🙂 Based on my experience with GH issue curation this will literally save hours of maintainer time. |
Running linter in gilab ci
golangci-lint:v1.17
go 1.12
err log:
.golangci.yml:
The text was updated successfully, but these errors were encountered: