Trim excess shellcheck annotations. Widen to all non-Korn scripts

Before, make shellcheck checked
  scripts/{commitcheck,make_gitrev,man-dates,paxcheck,zfs-helpers,zfs,
           zfs-tests,zimport,zloop}.sh
  cmd/zed/zed.d/{{all-debug,all-syslog,data-notify,generic-notify,
                 resilver_finish-start-scrub,scrub_finish-notify,
                 statechange-led,statechange-notify,trim_finish-notify,
                 zed-functions}.sh,history_event-zfs-list-cacher.sh.in}
  cmd/zpool/zpool.d/{dm-deps,iostat,lsblk,media,ses,smart,upath}
now it also checks
  contrib/dracut/{02zfsexpandknowledge/module-setup,
                  90zfs/{export-zfs,parse-zfs,zfs-needshutdown,
                         zfs-load-key,zfs-lib,module-setup,
                         mount-zfs,zfs-generator}}.sh.in
  cmd/zed/zed.d/{pool_import-led,vdev_attach-led,
                 resilver_finish-notify,vdev_clear-led}.sh
  contrib/initramfs/{zfsunlock,hooks/zfs.in,scripts/local-top/zfs}
  tests/zfs-tests/tests/perf/scripts/prefetch_io.sh
  scripts/common.sh.in
  contrib/bpftrace/zfs-trace.sh
  autogen.sh

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12042
This commit is contained in:
наб
2021-05-14 14:02:11 +02:00
committed by Brian Behlendorf
parent 2ca77988a5
commit 6fc3099248
18 changed files with 75 additions and 89 deletions
+4 -6
View File
@@ -91,8 +91,8 @@ esac
function core_file
{
# shellcheck disable=SC2012 disable=2086
printf "%s" "$(ls -tr1 $coreglob 2> /dev/null | head -1)"
# shellcheck disable=SC2012,SC2086
ls -tr1 $coreglob 2>/dev/null | head -1
}
function core_prog
@@ -100,8 +100,7 @@ function core_prog
prog=$ZTEST
core_id=$($GDB --batch -c "$1" | grep "Core was generated by" | \
tr \' ' ')
# shellcheck disable=SC2076
if [[ "$core_id" =~ "zdb " ]]; then
if [[ "$core_id" == *"zdb "* ]]; then
prog=$ZDB
fi
printf "%s" "$prog"
@@ -303,8 +302,7 @@ while [[ $timeout -eq 0 ]] || [[ $curtime -le $((starttime + timeout)) ]]; do
zopt="$zopt -s $size"
zopt="$zopt -f $workdir"
# shellcheck disable=SC2124
cmd="$ZTEST $zopt $@"
cmd="$ZTEST $zopt $*"
desc="$(date '+%m/%d %T') $cmd"
echo "$desc" | tee -a ztest.history
echo "$desc" >>ztest.out