From: Terry Burton Date: Thu, 31 Dec 2020 09:39:45 +0000 (+0000) Subject: Minor tweaks to eapol_test-build.sh; Disable shellcheck SC2223 (#3826) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2b768f2a0b7d72ffd82dc15ab2d0104c90b0e26;p=thirdparty%2Ffreeradius-server.git Minor tweaks to eapol_test-build.sh; Disable shellcheck SC2223 (#3826) Fixes for issues SC2086 and SC2236 from Super Linter output... In scripts/ci/eapol_test-build.sh line 41: : ${BUILD_CONF_DIR:="$(dirname $0)/eapol_test"} ^-- SC2223: This default assignment may cause DoS due to globbing. Quote it. ^-- SC2086: Double quote to prevent globbing and word splitting. In scripts/ci/eapol_test-build.sh line 51: if [ ! -z "${WHICH_EAPOL_TEST}" ]; then ^-- SC2236: Use -n instead of ! -z. Disable SC2223: "This default assignment may cause DoS due to globbing. Quote it" since this is easy to trigger and rarely a concern. --- diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 00000000000..1185f6e3b0a --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1,6 @@ +# +# SC2223: This default assignment may cause DoS due to globbing. Quote it. +# +# Easy to trigger and rarely a concern. +# +disable=SC2223 diff --git a/scripts/ci/eapol_test-build.sh b/scripts/ci/eapol_test-build.sh index a8e6ce25bcc..f10ef43b386 100755 --- a/scripts/ci/eapol_test-build.sh +++ b/scripts/ci/eapol_test-build.sh @@ -38,7 +38,7 @@ TMP_BUILD_DIR="${BUILD_DIR}" : ${WPA_SUPPLICANT_DIR:="${HOSTAPD_DIR}/wpa_supplicant"} : ${MAKE:=make} -: ${BUILD_CONF_DIR:="$(dirname $0)/eapol_test"} +: ${BUILD_CONF_DIR:="$(dirname "$0")/eapol_test"} : ${EAPOL_TEST_PATH:="${BUILD_CONF_DIR}/eapol_test"} if [ -z "${FORCE_BUILD}" ]; then @@ -48,7 +48,7 @@ if [ -z "${FORCE_BUILD}" ]; then fi WHICH_EAPOL_TEST="$(which eapol_test)" - if [ ! -z "${WHICH_EAPOL_TEST}" ]; then + if [ -n "${WHICH_EAPOL_TEST}" ]; then echo "${WHICH_EAPOL_TEST}" exit 0 fi