shellcheck: fix warnings

This commit is contained in:
Jose Storopoli 2024-09-02 12:31:06 -03:00
parent 41a6d4369a
commit 9f9bd34365
No known key found for this signature in database
GPG Key ID: 29E00111DE172C28
3 changed files with 3 additions and 11 deletions

View File

@ -42,10 +42,6 @@ say() {
echo "extra_tests: $1"
}
say_err() {
say "$1" >&2
}
verbose_say() {
if [ "$flag_verbose" = true ]; then
say "$1"

View File

@ -48,10 +48,6 @@ say() {
echo "extra_tests: $1"
}
say_err() {
say "$1" >&2
}
verbose_say() {
if [ "$flag_verbose" = true ]; then
say "$1"

View File

@ -26,8 +26,8 @@ if [ "$allownonascii" != "true" ] &&
# 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
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
test "$(git diff --cached --name-only --diff-filter=A -z "$against" |
LC_ALL=C tr -d '[ -~]\0' | wc -c)" != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
@ -44,7 +44,7 @@ EOF
fi
# If there are whitespace errors, print the offending file names and fail.
git diff-index --check --cached $against -- || exit 1
git diff-index --check --cached "$against" -- || exit 1
# Check that code lints cleanly.
cargo clippy --features=rand,std,recovery,lowmemory,global-context --all-targets -- -D warnings || exit 1