Skip to content
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

cmd/vet: go vet not supporting vendoring #15182

gaillard opened this issue Apr 7, 2016 · 4 comments


None yet
4 participants
Copy link

commented Apr 7, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?


  1. What operating system and processor architecture are you using (go env)?

linux amd64

  1. What did you do?

vendor a package into another. run 'go tool vet -v thepkg/thefile.go'

  1. What did you expect to see?

Any vet reports.

  1. What did you see instead?

Missing reports when compared to having the vendored lib in the gopath like normal. Also see in the output, something like:

vet: ./internal/httpserver/httpserver.go:13:2: could not import (can't find import: COMPANYSPECIFIC/vendor/

which is not the case if the dependency is in the gopath.

Another user with the same thing on the mailing list and me whining in the thread :)!searchin/golang-nuts/vet$20vendor/golang-nuts/uTcfZ15Ks0U/XBOXyfVPAQAJ


@bradfitz bradfitz changed the title go vet not supporting vendoring cmd/vet: go vet not supporting vendoring Apr 9, 2016

@bradfitz bradfitz added this to the Unplanned milestone Apr 9, 2016


This comment has been minimized.

Copy link

commented Apr 9, 2016

I think this might only work at the package level, not files.

/cc @robpike @dsymonds


This comment has been minimized.

Copy link

commented Apr 9, 2016

using without going through tool swallows errors, so is there a way to find out? It seems consistent that the error given from going through tool is what is causing the missing vet reports when not going through tool.


This comment has been minimized.

Copy link

commented Apr 10, 2016

Given just the file, it can't do the imports necessary to do the full job, and lacking the imports will lack the vendored imports. Try go tool vet -v thepkg. If that doesn't work, call in a vendoring expert.

@bradfitz bradfitz added the Vendoring label Apr 10, 2016


This comment has been minimized.

Copy link

commented Oct 31, 2017

Change mentions this issue: cmd/go: pass package config to vet during "go vet"

@gopherbot gopherbot closed this in 5617864 Nov 1, 2017

@golang golang locked and limited conversation to collaborators Nov 1, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.