aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vet/main.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-08-02 12:06:58 -0700
committerIan Lance Taylor <iant@golang.org>2017-08-03 04:22:02 +0000
commit664cd26c89ec59cb6b686a9b3887ace7a76b0047 (patch)
tree6371fd93dd3d835f9cdf5b217f3458c2e90c24eb /src/cmd/vet/main.go
parenta8730cd93a6731a14519902ccfed604971d3e8dc (diff)
downloadgo-664cd26c89ec59cb6b686a9b3887ace7a76b0047.tar.gz
go-664cd26c89ec59cb6b686a9b3887ace7a76b0047.zip
cmd/vet: don't exit with failure on type checking error
The vet tool only reports a type checking error when invoked with -v. Don't let that by itself cause vet to exit with an error exit status. Updates #21188 Change-Id: I172c13d46c35d49e229e96e833683d8c82a77de7 Reviewed-on: https://go-review.googlesource.com/52851 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/cmd/vet/main.go')
-rw-r--r--src/cmd/vet/main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go
index 77376c90ed..34c5297b89 100644
--- a/src/cmd/vet/main.go
+++ b/src/cmd/vet/main.go
@@ -349,8 +349,9 @@ func doPackage(directory string, names []string, basePkg *Package) *Package {
pkg.files = files
// Type check the package.
err := pkg.check(fs, astFiles)
- if err != nil && *verbose {
- warnf("%s", err)
+ if err != nil {
+ // Note that we only report this error when *verbose.
+ Println(err)
}
// Check.