From 0c63c7c854da361e124de9a05df4f28e1efc81a8 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Fri, 6 Sep 2019 20:58:34 +0800 Subject: [PATCH] build/Makefile: Properly exclude files under "./vendor/" path for `go fmt` (#19097) Properly exclude files under "./vendor/" path, and find "files" only. The original method "might" found "directories" with the same naming, or, might exclude occasionally exclude the go files with "vendor" string in any part of its path. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 099745886..368294409 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION?="0.3.32" TEST?=./... -GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor) +GOFMT_FILES?=$$(find . -not -path "./vendor/*" -type f -name '*.go') WEBSITE_REPO=github.com/hashicorp/terraform-website default: test