From 0f72df0a148286fbf3e276e81171867c473a93ef Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 25 Aug 2022 22:13:47 +0200 Subject: [PATCH] shellcheck: ignore SC2317 This check gives a lot of false positives; ignoring it; ``` In build/install.sh line 106: set +x ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 108: yy_a="$(echo "$1" | cut -d'.' -f1)" ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^-----------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 109: yy_b="$(echo "$2" | cut -d'.' -f1)" ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^-----------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 110: if [ "$yy_a" -lt "$yy_b" ]; then ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^---------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 111: return 1 ^------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 113: if [ "$yy_a" -gt "$yy_b" ]; then ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^---------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 114: return 0 ^------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 116: mm_a="$(echo "$1" | cut -d'.' -f2)" ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^-----------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 117: mm_b="$(echo "$2" | cut -d'.' -f2)" ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^-----------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 118: if [ "${mm_a#0}" -lt "${mm_b#0}" ]; then ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^-----------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 119: return 1 ^------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 122: return 0 ^------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In build/install.sh line 659: exit 1 ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). For more information: https://www.shellcheck.net/wiki/SC2317 -- Command appears to be unreachable... make: *** [Makefile:20: shellcheck] Error 1 ``` Signed-off-by: Sebastiaan van Stijn --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 33017cf..76cd4b5 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION?= CHANNEL?= VOLUME_MOUNTS=-v "$(CURDIR)":/v -SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117) +SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117 SC2317) SHELLCHECK=docker run --rm $(VOLUME_MOUNTS) -w /v koalaman/shellcheck $(SHELLCHECK_EXCLUSIONS) ENVSUBST_VARS=LOAD_SCRIPT_COMMIT_SHA