diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-11-07 14:37:56 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-11-13 18:05:26 +0200 |
commit | fe0ff569ea6c353f88609c0f5f9b6fa80ff74f15 (patch) | |
tree | 53ed10068a39ef9a8423811ea75bdb8d4de3d0b3 /test/lint/lint-shell.sh | |
parent | 9a1ad7bc0dd8a0769738ca4dffbeb8d55438b0dc (diff) | |
download | bitcoin-fe0ff569ea6c353f88609c0f5f9b6fa80ff74f15.tar.xz |
test: Enable SC2046 shellcheck rule
Diffstat (limited to 'test/lint/lint-shell.sh')
-rwxr-xr-x | test/lint/lint-shell.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh index 1a12df6591..d697dfcbea 100755 --- a/test/lint/lint-shell.sh +++ b/test/lint/lint-shell.sh @@ -10,7 +10,6 @@ export LC_ALL=C # Disabled warnings: disabled=( - SC2046 # Quote this to prevent word splitting. SC2162 # read without -r will mangle backslashes. ) @@ -25,7 +24,8 @@ SHELLCHECK_CMD=(shellcheck --external-sources --check-sourced) EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")" # 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 +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 |