Skip to content

Commit 3d1c0fe

Browse files
committed
Revert "Do not suppress any shellcheck warnings"
This reverts commit 26664df. 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 <[email protected]>
1 parent 24b9ba0 commit 3d1c0fe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ install:
1313
cp -R tests common $(dest)
1414
$(MAKE) -C src dest=$(dest)/src install
1515

16-
SHELLCHECK_EXCLUDE := ""
16+
# SC2119: "Use foo "$@" if function's $1 should mean script's $1". False
17+
# positives on helpers like _init_scsi_debug.
18+
SHELLCHECK_EXCLUDE := SC2119
1719

1820
check:
1921
shellcheck -x -e $(SHELLCHECK_EXCLUDE) -f gcc check new common/* \

0 commit comments

Comments
 (0)