From 8a74cd9a599a6de6783073a629754f14512d9d02 Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Tue, 3 Sep 2019 11:20:43 -0400 Subject: [PATCH] test: Shellcheck - apply rule SC2020 Invalid flags are not handled. Add a *) case. Change-Id: Ib3e0d978ed9a131a5ab23a2bc5013bbe0698d1be Signed-off-by: Pawel Kaminski Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467268 Reviewed-by: Paul Luse Reviewed-by: Karol Latecki Reviewed-by: Ben Walker Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins --- scripts/check_format.sh | 2 +- scripts/vagrant/run-autorun.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index fab5eb8d3..28f104c23 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -247,7 +247,7 @@ SC2059,SC2068,SC2074,SC2086,SC2088,SC2089,SC2090,SC2091,SC2094,\ SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\ SC2129,SC2140,SC2142,SC2143,SC2145,SC2146,SC2148,SC2152,SC2153,SC2154,SC2155,\ SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,SC2178,SC2181,SC2191,SC2192,SC2195,\ -SC2199,SC2206,SC2207,SC2209,SC2214,SC2219,SC2220,SC2223,SC2230,SC2231,SC2235" +SC2199,SC2206,SC2207,SC2209,SC2214,SC2219,SC2223,SC2230,SC2231,SC2235" # 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. diff --git a/scripts/vagrant/run-autorun.sh b/scripts/vagrant/run-autorun.sh index 109508366..113cd7f2d 100755 --- a/scripts/vagrant/run-autorun.sh +++ b/scripts/vagrant/run-autorun.sh @@ -84,6 +84,11 @@ while getopts "d:qhn" opt; do h) display_help >&2 exit 0 ;; + *) echo "Invalid option" + echo "" + display_help >&2 + exit 1 + ;; esac done