diff options
Diffstat (limited to 'test/lint/lint-shell.sh')
-rwxr-xr-x | test/lint/lint-shell.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh index 0e18c73013..1a12df6591 100755 --- a/test/lint/lint-shell.sh +++ b/test/lint/lint-shell.sh @@ -11,7 +11,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 +23,9 @@ 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|minisketch|univalue)/'); then +# Check shellcheck directive used for sourced files +mapfile -t SOURCED_FILES < <(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') +if ! "${SHELLCHECK_CMD[@]}" "$EXCLUDE" "${SOURCED_FILES[@]}" $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|minisketch|univalue)/'); then EXIT_CODE=1 fi |