From 54468a76f5ca57b8e7f07dfa4fdcce710c6161e5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 1 Oct 2020 10:35:09 -0400 Subject: [PATCH] provider: Update Makefile fmt target to ignore ./awsproviderlint/vendor (#15426) Reference: https://github.com/terraform-providers/terraform-provider-aws/pull/15391 Previously was not an issue before because we were vendoring in the root directory and explicitly referencing package subdirectories. Now that a vendor directory is included in ./awsproviderlint/ we need to exclude it. Using Makefile's built-in filter-out and wildcard functions to avoid platform specific issues with find, grep, etc. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index c43498db5cb1..c5b78d0cfa2c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -37,7 +37,7 @@ testacc: fmtcheck fmt: @echo "==> Fixing source code with gofmt..." - gofmt -s -w ./$(PKG_NAME) ./awsproviderlint + gofmt -s -w ./$(PKG_NAME) $(filter-out ./awsproviderlint/go% ./awsproviderlint/README.md ./awsproviderlint/vendor, $(wildcard ./awsproviderlint/*)) # Currently required by tf-deploy compile fmtcheck: