From a2a97c4da12e5d25a9bd507a7342b5035380f2d5 Mon Sep 17 00:00:00 2001 From: Tiger Kaovilai Date: Fri, 21 Jun 2024 13:47:58 -0400 Subject: [PATCH] ignore .git dir when formatting Signed-off-by: Tiger Kaovilai --- hack/update-1fmt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/update-1fmt.sh b/hack/update-1fmt.sh index 204801bdf..a23261cb2 100755 --- a/hack/update-1fmt.sh +++ b/hack/update-1fmt.sh @@ -33,7 +33,7 @@ if ! command -v goimports > /dev/null; then exit 1 fi -files="$(find . -type f -name '*.go' -not -path './.go/*' -not -path './vendor/*' -not -path './site/*' -not -path '*/generated/*' -not -name 'zz_generated*' -not -path '*/mocks/*')" +files="$(find . -type f -name '*.go' -not -path './.go/*' -not -path './vendor/*' -not -path './site/*' -not -path './.git/*' -not -path '*/generated/*' -not -name 'zz_generated*' -not -path '*/mocks/*')" echo "${ACTION} gofmt" output=$(gofmt "${MODE}" -s ${files}) if [[ -n "${output}" ]]; then