瀏覽代碼

chore(shellcheck): use `git grep` to search only tracked files

Thales Macedo Garitezi 4 年之前
父節點
當前提交
fe444bf134
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      scripts/shellcheck.sh

+ 1 - 5
scripts/shellcheck.sh

@@ -6,11 +6,7 @@ target_files=()
 while IFS='' read -r line;
 while IFS='' read -r line;
 do
 do
   target_files+=("$line");
   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
 return_code=0
 for i in "${target_files[@]}"; do
 for i in "${target_files[@]}"; do
   echo checking "$i" ...
   echo checking "$i" ...