Add ShellCheck's --enable=all inside scripts/

Strengthen static code analysis for shell scripts.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12914
This commit is contained in:
Damian Szuberski
2022-01-13 19:09:19 +01:00
committed by GitHub
parent 8a7c4efd3c
commit 836136961a
10 changed files with 105 additions and 81 deletions
+6 -3
View File
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC2154
#
# CDDL HEADER START
#
@@ -422,6 +423,8 @@ while getopts 'hvqxkfScRn:d:s:r:?t:T:u:I:' OPTION; do
usage
exit
;;
*)
;;
esac
done
@@ -442,7 +445,7 @@ if [ -n "$SINGLETEST" ]; then
SINGLEQUIET="True"
fi
cat >$RUNFILE_DIR/$RUNFILES << EOF
cat >"${RUNFILE_DIR}/${RUNFILES}" << EOF
[DEFAULT]
pre =
quiet = $SINGLEQUIET
@@ -466,7 +469,7 @@ EOF
CLEANUPSCRIPT="cleanup"
fi
cat >>$RUNFILE_DIR/$RUNFILES << EOF
cat >>"${RUNFILE_DIR}/${RUNFILES}" << EOF
[$SINGLETESTDIR]
tests = ['$SINGLETESTFILE']
@@ -745,4 +748,4 @@ if [ -n "$SINGLETEST" ]; then
rm -f "$RUNFILES" >/dev/null 2>&1
fi
exit ${RESULT}
exit "${RESULT}"