test: Shellcheck - move rule SC2016 to permanent exception list.

SC2016: Expressions don't expand in single quotes, use double quotes for that.
We need to exclude this shellcheck because in some cases, for example in
test/vhost/common.sh we echo line to new script file.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I98d322d917cbda034787cb29a267b86a8ad7e7ec
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Maciej Wawryk 2019-11-25 13:01:28 +01:00 committed by Tomasz Zawadzki
parent a69df7ea94
commit 0951fc4fea

View File

@ -241,7 +241,7 @@ if hash shellcheck 2>/dev/null; then
# Error descriptions can also be found at: https://github.com/koalaman/shellcheck/wiki # 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. # This SHCK_EXCLUDE list is out "to do" and we work to fix all of this errors.
SHCK_EXCLUDE="SC1083,SC2002,\ SHCK_EXCLUDE="SC1083,SC2002,\
SC2010,SC2016,SC2034,SC2045,SC2046,SC2086,SC2089,SC2090,\ SC2010,SC2034,SC2045,SC2046,SC2086,SC2089,SC2090,\
SC2097,SC2098,SC2119,SC2120" SC2097,SC2098,SC2119,SC2120"
# SPDK fails some error checks which have been deprecated in later versions of shellcheck. # 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 # We will not try to fix these error checks, but instead just leave the error types here
@ -252,6 +252,7 @@ SC2097,SC2098,SC2119,SC2120"
# SC1090: Can't follow non-constant source. Use a directive to specify location. # SC1090: Can't follow non-constant source. Use a directive to specify location.
# SC1091: Not following: (error message here) # SC1091: Not following: (error message here)
# SC2001: See if you can use ${variable//search/replace} instead. # SC2001: See if you can use ${variable//search/replace} instead.
# SC2016: Expressions don't expand in single quotes, use double quotes for that.
# SC2148: Add shebang to the top of your script. # SC2148: Add shebang to the top of your script.
# SC2153: Possible Misspelling: MYVARIABLE may not be assigned, but MY_VARIABLE is. # SC2153: Possible Misspelling: MYVARIABLE may not be assigned, but MY_VARIABLE is.
# SC2154: var is referenced but not assigned. # SC2154: var is referenced but not assigned.
@ -261,7 +262,7 @@ SC2097,SC2098,SC2119,SC2120"
# or split robustly with mapfile or read -a. # or split robustly with mapfile or read -a.
# SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting). # 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. # SC2223: This default assignment may cause DoS due to globbing. Quote it.
SHCK_EXCLUDE="$SHCK_EXCLUDE,SC1090,SC1091,SC2148,SC2153,SC2154,SC2164,\ SHCK_EXCLUDE="$SHCK_EXCLUDE,SC1090,SC1091,SC2016,SC2148,SC2153,SC2154,SC2164,\
SC2174,SC2001,SC2206,SC2207,SC2223" SC2174,SC2001,SC2206,SC2207,SC2223"
SHCK_FORMAT="diff" SHCK_FORMAT="diff"