From: Shin'ichiro Kawasaki Date: Wed, 30 Aug 2023 10:41:34 +0000 (+0900) Subject: Revert "Do not suppress any shellcheck warnings" X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3d1c0fe2677d60f68c9ccf4912b30e77344eed04;p=users%2Fsagi%2Fblktests.git Revert "Do not suppress any shellcheck warnings" This reverts commit 26664dff17b626550fae99181112f9ceff9bb971. The commit enabled the shellcheck warning SC2119 based on the understanding that bash would pass arguments list "$@" from caller to callee when functions are called without arguments. However, it was not correct then merit of SC2119 is not so important. On the other hand, SC2119 reports false positive warning when bash functions take optional arguments and they are called without arguments. Per discussion on the list [1], we concluded that the merit of optional arguments is larger than that of SC2119. Hence, disable SC2119 again. [1] https://lore.kernel.org/linux-nvme/o5xnqvujzakhrudv7p64owiuzgozmean6blxow4vdxhdqozg5v@qznf2tzmey7k/ Signed-off-by: Shin'ichiro Kawasaki --- diff --git a/Makefile b/Makefile index 5a04479..4bed1da 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,9 @@ install: cp -R tests common $(dest) $(MAKE) -C src dest=$(dest)/src install -SHELLCHECK_EXCLUDE := "" +# SC2119: "Use foo "$@" if function's $1 should mean script's $1". False +# positives on helpers like _init_scsi_debug. +SHELLCHECK_EXCLUDE := SC2119 check: shellcheck -x -e $(SHELLCHECK_EXCLUDE) -f gcc check new common/* \