How to trigger tools like golint and go vet?

I recently heard about tooling like golint and go vet and I’m wondering how you guys use them. For example, if I run golint in the root of my project (so where the main is), then I don’t receive any output. If I run it in one of the packages, then I do receive output.

the most ideal situation would be to recursively run these tooling from inside the root of the project, right? But how?

Run golint ./... and the same for other tools to run them recursively.

1 Like

We use the library-driven approach where the package files are in the project root and the runnable programs have a main their own directories under cmd.

I found this Git commit hook a while back and use it on all my Go repositories:

1 Like


You can use a tool such which triggers all tools.

$ gometalinter ./...

output will be very noisy but depends on your coding style :wink:

Again, thanks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.