From fe444bf134d2d4b92cebca758de4f090b897ff09 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Tue, 28 Dec 2021 16:49:24 -0300 Subject: [PATCH] chore(shellcheck): use `git grep` to search only tracked files --- scripts/shellcheck.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/shellcheck.sh b/scripts/shellcheck.sh index ee69d8787..c00a87caa 100755 --- a/scripts/shellcheck.sh +++ b/scripts/shellcheck.sh @@ -6,11 +6,7 @@ target_files=() while IFS='' read -r line; do target_files+=("$line"); -done < <(grep -r -l \ - --exclude-dir=.git \ - --exclude-dir=_build \ - --exclude-dir=deps \ - "^#!/bin/" .) +done < <(git grep -r -l "^#!/bin/" .) return_code=0 for i in "${target_files[@]}"; do echo checking "$i" ...