barakmich / go-nyet

More aggressive `go vet`
BSD 2-Clause "Simplified" License
89 stars 8 forks source link

Not a superset of "go vet" #2

Open alecthomas opened 9 years ago

alecthomas commented 9 years ago

I'm not sure if this is intentional, but go-nyet doesn't pick up some issues that go vet does. eg.

devtodo2$ go vet .
importer.go:29: possible formatting directive in fatal call
importer.go:39: possible formatting directive in fatal call
main.go:115: possible formatting directive in fatal call
main.go:126: possible formatting directive in fatal call
main.go:174: possible formatting directive in fatal call
main.go:189: possible formatting directive in fatal call
main.go:237: possible formatting directive in fatal call
main.go:284: possible formatting directive in fatal call
main.go:288: possible formatting directive in fatal call
main.go:336: possible formatting directive in fatal call
exit status 1
devtodo2$ go-nyet .
consoleview.go:67:2:Odd decl (const, import, or type) in body

This is not a big deal, but it does also seem to include some checks that are the same for both, so if you run both tools you sometimes get duplicates.

Basically I'd like to run either both of them, or just one of them, get the same coverage, and not get duplicates.

barakmich commented 9 years ago

Fair point -- I've imagined that you run both of them and they catch different things.

The error you've pointed to here is really just a debugging message and not an error, so I should fix that for sure.

GeertJohan commented 9 years ago

Hi @barakmich, Thanks for creating this tool!

I think it would be nice if go-nyet would be usable as a superset of go-vet directly, in the same way goimports and goreturns are for gofmt. What would be required for this is:

This would make go-nyet a hot-plugable alternative in IDE's. In the same way as goimports and goreturns currently are. For instance in the atom go-plus plugin.