Skip to content

Commit 9f9bd34

Browse files
committed
shellcheck: fix warnings
1 parent 41a6d43 commit 9f9bd34

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

contrib/extra_tests.sh

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ say() {
4242
echo "extra_tests: $1"
4343
}
4444

45-
say_err() {
46-
say "$1" >&2
47-
}
48-
4945
verbose_say() {
5046
if [ "$flag_verbose" = true ]; then
5147
say "$1"

contrib/sanitizer.sh

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ say() {
4848
echo "extra_tests: $1"
4949
}
5050

51-
say_err() {
52-
say "$1" >&2
53-
}
54-
5551
verbose_say() {
5652
if [ "$flag_verbose" = true ]; then
5753
say "$1"

githooks/pre-commit

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ if [ "$allownonascii" != "true" ] &&
2626
# Note that the use of brackets around a tr range is ok here, (it's
2727
# even required, for portability to Solaris 10's /usr/bin/tr), since
2828
# the square bracket bytes happen to fall in the designated range.
29-
test $(git diff --cached --name-only --diff-filter=A -z $against |
30-
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
29+
test "$(git diff --cached --name-only --diff-filter=A -z "$against" |
30+
LC_ALL=C tr -d '[ -~]\0' | wc -c)" != 0
3131
then
3232
cat <<\EOF
3333
Error: Attempt to add a non-ASCII file name.
@@ -44,7 +44,7 @@ EOF
4444
fi
4545

4646
# If there are whitespace errors, print the offending file names and fail.
47-
git diff-index --check --cached $against -- || exit 1
47+
git diff-index --check --cached "$against" -- || exit 1
4848

4949
# Check that code lints cleanly.
5050
cargo clippy --features=rand,std,recovery,lowmemory,global-context --all-targets -- -D warnings || exit 1

0 commit comments

Comments
 (0)