Commit 1eed2a5a authored by Fedor Korotkiy's avatar Fedor Korotkiy Committed by Bryan C. Mills

cmd/go: PackageVetx in vet.cfg should list only immediate dependencies.

Updates #30296

Change-Id: Ifea1a4c82c1c5b31fdc2e96fdbb1274748c8f50e
Reviewed-on: https://go-review.googlesource.com/c/go/+/164459Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 64dc4ba7
......@@ -423,7 +423,7 @@ func (b *Builder) vetAction(mode, depMode BuildMode, p *load.Package) *Action {
} else {
deps = []*Action{a1, aFmt}
}
for _, p1 := range load.PackageList(p.Internal.Imports) {
for _, p1 := range p.Internal.Imports {
deps = append(deps, b.vetAction(mode, depMode, p1))
}
......
env GO111MODULE=off
# Issue 30296. Verify that "go vet" uses only immediate dependencies.
# First run fills the cache.
go vet a
go vet -x a
! stderr 'transitive'
-- a/a.go --
package a
import "b"
func F() {
b.F()
}
-- b/b.go --
package b
import "transitive"
func F() {
transitive.F()
}
-- transitive/c.go --
package transitive
func F() {
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment