mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Pass --enable=all to shellcheck within contrib/
- Remove `SHELLCHECK_IGNORE` in favor of inline suppressions and more general `SHELLCHECK_OPTS`. - Exclude `SC2250` (turned on by `--enable=all`) globally - Pass `--enable=all` to shellcheck for scripts in contrib/: it's very important to catch errors early in areas that are not easily testable. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #12760
This commit is contained in:
@@ -9,3 +9,4 @@ SUBDIRS = local-top
|
||||
|
||||
SHELLCHECKDIRS = $(SUBDIRS)
|
||||
SHELLCHECK_SHELL = sh
|
||||
SHELLCHECK_OPTS = --enable=all
|
||||
|
||||
@@ -4,3 +4,5 @@ localtopdir = /usr/share/initramfs-tools/scripts/local-top
|
||||
|
||||
dist_localtop_SCRIPTS = \
|
||||
zfs
|
||||
|
||||
SHELLCHECK_OPTS = --enable=all
|
||||
|
||||
@@ -596,7 +596,7 @@ setup_snapshot_booting()
|
||||
retval=0
|
||||
|
||||
# Make sure that the snapshot specified actually exists.
|
||||
if [ ! "$(get_fs_value "${snap}" type)" ]
|
||||
if [ -z "$(get_fs_value "${snap}" type)" ]
|
||||
then
|
||||
# Snapshot does not exist (...@<null> ?)
|
||||
# ask the user for a snapshot to use.
|
||||
@@ -613,7 +613,8 @@ setup_snapshot_booting()
|
||||
then
|
||||
# If the destination dataset for the clone
|
||||
# already exists, destroy it. Recursively
|
||||
if [ "$(get_fs_value "${rootfs}_${snapname}" type)" ]; then
|
||||
if [ -n "$(get_fs_value "${rootfs}_${snapname}" type)" ]
|
||||
then
|
||||
filesystems=$("${ZFS}" list -oname -tfilesystem -H \
|
||||
-r -Sname "${ZFS_BOOTFS}")
|
||||
for fs in $filesystems; do
|
||||
@@ -848,7 +849,7 @@ mountroot()
|
||||
done
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
[ "$quiet" != "y" ] && zfs_log_end_msg $ZFS_ERROR
|
||||
[ "$quiet" != "y" ] && zfs_log_end_msg "$ZFS_ERROR"
|
||||
else
|
||||
# No auto - use value from the command line option.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user