Open campoy opened 5 years ago
there is one more "meta" linter: https://github.com/golangci/golangci-lint
golangci is used by many go projects and has very sane defaults: https://github.com/golangci/golangci-lint#trusted-by It support very similar configuration as we did in lookout.
I have tried to wrap it into lookout analyzer. Alpha (no go.mod support, no config support, ..) looks good: https://github.com/smacker/lookout-golang-analyzer
example of comments for engine (v0.10...current master) with defaults:
[2019-04-10T11:23:30.093519+02:00] INFO line comment app=lookout-sdk file=cmd/srcd/cmd/sql.go line=74 text=Error return value of `humanizef` is not checked
[2019-04-10T11:23:30.093548+02:00] INFO line comment app=lookout-sdk file=cmd/srcd/cmd/sql.go line=83 text=Error return value of `humanizef` is not checked
[2019-04-10T11:23:30.093573+02:00] INFO line comment app=lookout-sdk file=cmd/srcd/cmd/sql.go line=185 text=Error return value of `humanizef` is not checked
[2019-04-10T11:23:30.093596+02:00] INFO line comment app=lookout-sdk file=cmd/srcd/cmd/sql.go line=230 text=Error return value of `resp.CloseWrite` is not checked
[2019-04-10T11:23:30.093633+02:00] INFO line comment app=lookout-sdk file=docker/docker.go line=634 text=Error return value of `resizeTty` is not checked
[2019-04-10T11:23:30.09368+02:00] INFO line comment app=lookout-sdk file=docker/docker.go line=645 text=Error return value of `resizeTty` is not checked
[2019-04-10T11:23:30.09372+02:00] INFO line comment app=lookout-sdk file=cmd/srcd/cmd/sql.go line=90 text=SA1016: os.Kill cannot be trapped (did you mean syscall.SIGTERM?)
[2019-04-10T11:23:30.093753+02:00] INFO line comment app=lookout-sdk file=docker/docker.go line=259 text=SA1019: client.NewEnvClient is deprecated: use NewClientWithOpts(FromEnv)
[2019-04-10T11:23:30.093783+02:00] INFO line comment app=lookout-sdk file=docker/docker.go line=459 text=SA1019: client.NewEnvClient is deprecated: use NewClientWithOpts(FromEnv)
[2019-04-10T11:23:30.093809+02:00] INFO line comment app=lookout-sdk file=docker/docker.go line=548 text=SA1019: client.NewEnvClient is deprecated: use NewClientWithOpts(FromEnv)
gometalinter is now deprecated and the repository will be archived on 2019-04-07, as per alecthomas/gometalinter#590.
We might need to consider dropping support for gometalinter and instead go for staticcheck.