From 6df3f23f221302ae7a8a27e5926331786e09b0d8 Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Wed, 4 Dec 2019 09:44:12 -0500 Subject: [PATCH] test: Shellcheck - apply rule SC2097 and SC2098 SC2097: This assignment is only seen by the forked process. SC2098: This expansion will not see the mentioned assignment. Apply these two rules together as they point to the same code. Change-Id: I61020e8fd4b6db2b06ae8134d1004290a9bef9e7 Signed-off-by: Pawel Kaminski Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476777 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- autotest.sh | 1 + scripts/check_format.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autotest.sh b/autotest.sh index 4d01c63f5..78609e8a7 100755 --- a/autotest.sh +++ b/autotest.sh @@ -96,6 +96,7 @@ if [ $(uname -s) = Linux ]; then # automatic grabbing these devices when we add device/vendor ID to # proper driver. if [[ -n "$PCI_BLACKLIST" ]]; then + # shellcheck disable=SC2097,SC2098 PCI_WHITELIST="$PCI_BLACKLIST" \ PCI_BLACKLIST="" \ DRIVER_OVERRIDE="pci-stub" \ diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 19265039f..39edb7138 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -240,7 +240,7 @@ if hash shellcheck 2>/dev/null; then # go to: https://trello.com/c/29Z90j1W # Error descriptions can also be found at: https://github.com/koalaman/shellcheck/wiki # This SHCK_EXCLUDE list is out "to do" and we work to fix all of this errors. - SHCK_EXCLUDE="SC1083,SC2002,SC2010,SC2034,SC2045,SC2046,SC2086,SC2097,SC2098" + SHCK_EXCLUDE="SC1083,SC2002,SC2010,SC2034,SC2045,SC2046,SC2086" # SPDK fails some error checks which have been deprecated in later versions of shellcheck. # We will not try to fix these error checks, but instead just leave the error types here # so that we can still run with older versions of shellcheck.