Merge rust-bitcoin/rust-bitcoin#3144: githooks: remove unnecessary shellcheck disables
a0febf7eed
githooks: remove unnecessary shellcheck disables (Jose Storopoli) Pull request description: We don't need to worry about nested quoting in SC2046. Thanks to Kixunil in https://github.com/rust-bitcoin/rust-secp256k1/pull/697 for pointing that out. ACKs for top commit: Kixunil: ACKa0febf7eed
tcharding: ACKa0febf7eed
apoelstra: ACKa0febf7eed
successfully ran local tests Tree-SHA512: 83cdcc55c7e7922c05f5e78305086595a96745f34ea68ee99ed1c08c97683bd45d3c62e8d8b4bcba6b0572c9c65178ff4e21abd7178e2e8b0c9e42f4b25508fb
This commit is contained in:
commit
c22aea50ec
|
@ -22,14 +22,12 @@ exec 1>&2
|
||||||
# Cross platform projects tend to avoid non-ASCII filenames; prevent
|
# Cross platform projects tend to avoid non-ASCII filenames; prevent
|
||||||
# them from being added to the repository. We exploit the fact that the
|
# them from being added to the repository. We exploit the fact that the
|
||||||
# printable range starts at the space character and ends with tilde.
|
# printable range starts at the space character and ends with tilde.
|
||||||
# disable the check to quoting the $(...) command
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
if [ "$allownonascii" != "true" ] &&
|
if [ "$allownonascii" != "true" ] &&
|
||||||
# Note that the use of brackets around a tr range is ok here, (it's
|
# Note that the use of brackets around a tr range is ok here, (it's
|
||||||
# even required, for portability to Solaris 10's /usr/bin/tr), since
|
# even required, for portability to Solaris 10's /usr/bin/tr), since
|
||||||
# the square bracket bytes happen to fall in the designated range.
|
# the square bracket bytes happen to fall in the designated range.
|
||||||
test $(git diff --cached --name-only --diff-filter=A -z "$against" |
|
test "$(git diff --cached --name-only --diff-filter=A -z "$against" |
|
||||||
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
|
LC_ALL=C tr -d '[ -~]\0' | wc -c)" != 0
|
||||||
then
|
then
|
||||||
cat <<\EOF
|
cat <<\EOF
|
||||||
Error: Attempt to add a non-ASCII file name.
|
Error: Attempt to add a non-ASCII file name.
|
||||||
|
@ -49,6 +47,4 @@ fi
|
||||||
git diff-index --check --cached "$against" -- || exit 1
|
git diff-index --check --cached "$against" -- || exit 1
|
||||||
|
|
||||||
# Check that code lints cleanly.
|
# Check that code lints cleanly.
|
||||||
# disable the check to quoting the $(...) command
|
cargo +"$(cat ./nightly-version)" clippy --workspace --all-targets --all-features -- --deny warnings || exit 1
|
||||||
# shellcheck disable=SC2046
|
|
||||||
cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings || exit 1
|
|
||||||
|
|
Loading…
Reference in New Issue