mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Add ShellCheck's --enable=all inside etc/
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 #12913
This commit is contained in:
+2
-1
@@ -15,4 +15,5 @@ pkgsysconf_SCRIPTS = \
|
||||
|
||||
SUBSTFILES += $(pkgsysconf_SCRIPTS)
|
||||
|
||||
SHELLCHECK_SHELL = dash # local variables
|
||||
SHELLCHECK_OPTS = --enable=all
|
||||
SHELLCHECK_SHELL = dash
|
||||
|
||||
@@ -46,6 +46,7 @@ elif type success > /dev/null 2>&1 ; then
|
||||
|
||||
zfs_log_begin_msg() { printf "%s" "$1 "; }
|
||||
zfs_log_end_msg() {
|
||||
# shellcheck disable=SC2154
|
||||
zfs_set_ifs "$OLD_IFS"
|
||||
if [ "$1" -eq 0 ]; then
|
||||
success
|
||||
@@ -119,12 +120,12 @@ zfs_action()
|
||||
$CMD
|
||||
ret=$?
|
||||
if [ "$ret" -eq 0 ]; then
|
||||
zfs_log_end_msg $ret
|
||||
zfs_log_end_msg "$ret"
|
||||
else
|
||||
zfs_log_failure_msg $ret
|
||||
zfs_log_failure_msg "$ret"
|
||||
fi
|
||||
|
||||
return $ret
|
||||
return "$ret"
|
||||
}
|
||||
|
||||
# Returns
|
||||
|
||||
Reference in New Issue
Block a user