-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[modules/go] re-write go vet target #109
Conversation
use `go too vet $dir` to vet code
modules/go/Makefile.style
Outdated
@@ -6,7 +6,7 @@ go/lint: $(GO) go/vet | |||
## Vet code | |||
go/vet: $(GO) | |||
$(call assert-set,GO) | |||
find . ! -path "*/vendor/*" ! -path "*/.glide/*" -type f -name '*.go' | xargs $(GO) vet -v | |||
$(GO) tool vet -v $(CURDIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this go recursively? E.g. projects have go code in multiple folders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeap, it recursively descends the directory, vetting each package it finds.
https://golang.org/cmd/vet/#hdr-Using_vet_directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
But we need to exclude the vendor folder since we have to control over the formatting of 3rd party code. Will this automatically exclude that? |
@osterman hm, you're right. |
what
use
go too vet $dir
to vet codewhy
go vet
command require:Should fix cloudposse/github-authorized-keys#29