From 266447a7e7e4b7682a879a640f08562f6148a7ed Mon Sep 17 00:00:00 2001 From: Paul Lindner Date: Sun, 7 Jan 2018 19:07:40 -0800 Subject: [PATCH] dev/devcam: import vendor files as-is, do not require gofmt Change-Id: If3afd3769dbad0a20bd8ff2f2bbb5eb9f89f345a --- dev/devcam/hook.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev/devcam/hook.go b/dev/devcam/hook.go index 6fa193d94..8dd030b5b 100644 --- a/dev/devcam/hook.go +++ b/dev/devcam/hook.go @@ -337,6 +337,10 @@ func gofmtRequired(file string) bool { if !strings.HasSuffix(file, ".go") { return false } + // vendor files should be imported as-is + if strings.HasPrefix(file, "vendor/") { + return false + } if !strings.HasPrefix(file, "test/") { return true }