From 1f08daeb81756fbac0eb10b45a140e0fbf16c717 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Mon, 2 Dec 2019 13:17:39 +0100 Subject: [PATCH] test: Shellcheck - move rule SC2120 to permanent exception list. SC2120: foo references arguments, but none are ever passed. Signed-off-by: Maciej Wawryk Change-Id: Ic8d515ca5d0b81b77e22e1e726e403dc6678af5f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476469 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- scripts/check_format.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 68c7e8d62..9ffc079e0 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -240,9 +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,SC2120" + SHCK_EXCLUDE="SC1083,SC2002,SC2010,SC2034,SC2045,SC2046,SC2086,SC2097,SC2098" # 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. @@ -254,6 +252,7 @@ SC2097,SC2098,SC2120" # SC2001: See if you can use ${variable//search/replace} instead. # SC2016: Expressions don't expand in single quotes, use double quotes for that. # SC2119: Use foo "$@" if function's $1 should mean script's $1. + # SC2120: foo references arguments, but none are ever passed. # SC2148: Add shebang to the top of your script. # SC2153: Possible Misspelling: MYVARIABLE may not be assigned, but MY_VARIABLE is. # SC2154: var is referenced but not assigned. @@ -263,7 +262,7 @@ SC2097,SC2098,SC2120" # or split robustly with mapfile or read -a. # SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting). # SC2223: This default assignment may cause DoS due to globbing. Quote it. - SHCK_EXCLUDE="$SHCK_EXCLUDE,SC1090,SC1091,SC2016,SC2119,SC2148,SC2153,SC2154,SC2164,\ + SHCK_EXCLUDE="$SHCK_EXCLUDE,SC1090,SC1091,SC2016,SC2119,SC2120,SC2148,SC2153,SC2154,SC2164,\ SC2174,SC2001,SC2206,SC2207,SC2223" SHCK_FORMAT="diff"