]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vet: ignore printf failures in cmd
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 10 Sep 2016 22:21:12 +0000 (15:21 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sat, 10 Sep 2016 22:42:26 +0000 (22:42 +0000)
This is a temporary measure to work around #17057.
It will be reverted when #17057 is fixed.

Change-Id: I21c02f63f3530774c91065cfed5d9c566839ed9f
Reviewed-on: https://go-review.googlesource.com/28959
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/all/main.go

index 7aa02a2328e30cc7a6be108a2c0a2e0c9bd04385..8440312f53c645325aecfd28107bfdec4f68b762 100644 (file)
@@ -258,6 +258,15 @@ NextLine:
                        }
                }
 
+               // Temporarily ignore unrecognized printf verbs from cmd.
+               // The compiler now has several fancy verbs (CL 28339)
+               // used with types implementing fmt.Formatters,
+               // and I believe gri has plans to add many more.
+               // TODO: remove when issue 17057 is fixed.
+               if strings.HasPrefix(file, "cmd/") && strings.HasPrefix(msg, "unrecognized printf verb") {
+                       continue
+               }
+
                key := file + ": " + msg
                if w[key] == 0 {
                        // Vet error with no match in the whitelist. Print it.