diff options
author | Agniva De Sarker <agnivade@yahoo.co.in> | 2019-10-13 20:33:47 +0530 |
---|---|---|
committer | Alexander Rakoczy <alex@golang.org> | 2019-10-17 18:29:51 +0000 |
commit | 0b575b4fb052f87d564cbbc31489b5a1923a01d3 (patch) | |
tree | 1f8a29a8a24610de9e245135335a84ffa5db0611 | |
parent | 4cb22ee8120ddd9cd8a9ef88ae2a142c5d2f8432 (diff) | |
download | go-0b575b4fb052f87d564cbbc31489b5a1923a01d3.tar.gz go-0b575b4fb052f87d564cbbc31489b5a1923a01d3.zip |
[release-branch.go1.13] cmd/go/internal/work: fix error while passing custom vet tool
For GOROOT packages, we were adding -unsafeptr=false to prevent unsafe.Pointer
checks. But the flag also got passed to invocations of go vet with a custom
vet tool. To prevent this from happening, we add this flag only when no
tools are passed.
Updates #34053
Fixes #34922
Change-Id: I8bcd637fd8ec423d597fcdab2a0ceedd20786019
Reviewed-on: https://go-review.googlesource.com/c/go/+/200957
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit 902d5aa84f8340752c20b93bfd450a6cefcf3952)
Reviewed-on: https://go-review.googlesource.com/c/go/+/201237
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
-rw-r--r-- | src/cmd/go/internal/work/exec.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 7ff7b810f6..7dd9a90c18 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -1030,7 +1030,7 @@ func (b *Builder) vet(a *Action) error { // dependency tree turn on *more* analysis, as here. // (The unsafeptr check does not write any facts for use by // later vet runs.) - if a.Package.Goroot && !VetExplicit { + if a.Package.Goroot && !VetExplicit && VetTool == "" { // Note that $GOROOT/src/buildall.bash // does the same for the misc-compile trybots // and should be updated if these flags are |