dnephin / pre-commit-golang

Golang hooks for pre-commit
MIT License
656 stars 222 forks source link

Using simpler oneliner for go vet #62

Open arschles opened 3 years ago

arschles commented 3 years ago

The go vet check is failing in this PR (the logs are here). I'm not sure what's going on, but modern go vet ./... will run through all files in the repo. this is suboptimal, but it's not extremely slow in many cases. perhaps there should be two checks? just an idea, not sure if it's necessary

dnephin commented 3 years ago

There have been a number of PRs opened to fix/improve the govet hook. My latest recommendation is here.

If you want to run go vet on all files, I think that can already be done using the golangci-lint hook. You can configure golangci-lint to run go vet, and it always runs on all files. From the output you linked it seems like this is already being done. So maybe you can remove the govet hook entirely from your config?