From 0262d264d87eccf36e265fb87c8feaea8bbb4b8f Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Fri, 1 Apr 2022 13:40:28 +0100 Subject: [PATCH] Add in a `-not -path` option to find to prevent the command finding (#699) hidden directories (typically .git) to lint Signed-off-by: Matthew B White --- ci/scripts/lint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/lint.sh b/ci/scripts/lint.sh index 5cdb8ab0..5bdf2917 100755 --- a/ci/scripts/lint.sh +++ b/ci/scripts/lint.sh @@ -10,7 +10,7 @@ function print() { go install golang.org/x/tools/cmd/goimports@latest -dirs=("$(find . -name "*-go" -o -name "*-java" -o -name "*-javascript" -o -name "*-typescript")") +dirs=("$(find . -name "*-go" -o -name "*-java" -o -name "*-javascript" -o -name "*-typescript" -not -path '*/.*')") for dir in $dirs; do if [[ -d $dir ]] && [[ ! $dir =~ node_modules ]]; then print "Linting $dir"