Remove megacheck from travis CI and replace with staticcheck.
nitishm opened this issue · comments
Megacheck is causing Travis CI to crash and fail.
$ megacheck .
Megacheck has been deprecated. Please use staticcheck instead.
panic: internal error: malformed position "/tmp/gopackages819637706/go-build/net/cgo_linux.cgo1.go:1"
goroutine 1 [running]:
honnef.co/go/tools/lint/lintutil.parsePos(0xc4261a7100, 0x39, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:320 +0x331
honnef.co/go/tools/lint/lintutil.compileErrors(0xc420440fc0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:347 +0x134
honnef.co/go/tools/lint/lintutil.compileErrors(0xc4202cf5e0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:340 +0x456
honnef.co/go/tools/lint/lintutil.compileErrors(0xc4202cba40, 0xc420409bc0, 0xc4200e3350, 0x7f9eb46746c8)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:340 +0x456
honnef.co/go/tools/lint/lintutil.compileErrors(0xc4202ecb60, 0xc420409b90, 0xc4200e3540, 0x0)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:340 +0x456
honnef.co/go/tools/lint/lintutil.compileErrors(0xc4201da2a0, 0x0, 0x3, 0xc4264e5da0)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:340 +0x456
honnef.co/go/tools/lint/lintutil.Lint(0xc420089280, 0x3, 0x4, 0xc42008a010, 0x1, 0x1, 0xc4200e3d90, 0x900220, 0xc42007ea28, 0x0, ...)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:287 +0x4d7
honnef.co/go/tools/lint/lintutil.ProcessFlagSet(0xc420089280, 0x3, 0x4, 0xc4200a6660)
/home/travis/gopath/src/honnef.co/go/tools/lint/lintutil/util.go:178 +0x9b8
main.main()
/home/travis/gopath/src/honnef.co/go/tools/cmd/megacheck/megacheck.go:109 +0x7e6
The command "megacheck ." exited with 2.
The message shows megacheck has been deprecated and is to be replaced with staticcheck.
Approach this in two phases -
- Remove megacheck
- Introduce staticcheck (or any other alternative)
Phase one fixed in #17
Staticcheck offers extensive and customizable code analysis.
It would be best for the job.
Added in PR: #18