diff options
Diffstat (limited to 'test/lint/lint-shell.sh')
-rwxr-xr-x | test/lint/lint-shell.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh index ff335f5233..391f4825e8 100755 --- a/test/lint/lint-shell.sh +++ b/test/lint/lint-shell.sh @@ -10,8 +10,6 @@ export LC_ALL=C # Disabled warnings: disabled=( - SC2046 # Quote this to prevent word splitting. - SC2086 # Double quote to prevent globbing and word splitting. SC2162 # read without -r will mangle backslashes. ) @@ -24,8 +22,10 @@ fi SHELLCHECK_CMD=(shellcheck --external-sources --check-sourced) EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")" -SOURCED_FILES=$(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') # Check shellcheck directive used for sourced files -if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" $SOURCED_FILES $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then +# Check shellcheck directive used for sourced files +mapfile -t SOURCED_FILES < <(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') +mapfile -t FILES < <(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|minisketch|univalue)/') +if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" "${SOURCED_FILES[@]}" "${FILES[@]}"; then EXIT_CODE=1 fi |