From 6a3e3002b26f659040e27565592fd341c1ffcb5d Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 29 Jul 2021 11:20:20 +0200 Subject: [PATCH] Fix shellsheck warnings --- scripts/lint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index 95d4fe6..5b767a2 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -4,15 +4,15 @@ if [ -z ${PKG+x} ]; then echo "PKG is not set"; exit 1; fi if [ -z ${ROOT_DIR+x} ]; then echo "ROOT_DIR is not set"; exit 1; fi echo "gofmt:" -OUT=$(gofmt -l -s $ROOT_DIR 2>&1 | grep --invert-match -E "(/(example|vendor))") +OUT=$(gofmt -l -s "$ROOT_DIR" 2>&1 | grep --invert-match -E "(/(example|vendor))") if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi echo "errcheck:" -OUT=$(errcheck $PKG/... 2>&1 | grep --invert-match -E "(/(example|vendor))") +OUT=$(errcheck "$PKG/..." 2>&1 | grep --invert-match -E "(/(example|vendor))") if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi echo "go vet:" -OUT=$(go vet -all=true $ROOT_DIR 2>&1 | grep --invert-match -E "(Checking file|\%p of wrong type|can't check non-constant format|/example|/vendor)") +OUT=$(go vet -all=true "$ROOT_DIR" 2>&1 | grep --invert-match -E "(Checking file|\%p of wrong type|can't check non-constant format|/example|/vendor)") if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi echo "golint:" @@ -20,7 +20,7 @@ OUT=$(golint ./... 2>&1 | grep --invert-match -E "(^(example|vendor))") if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi echo "staticcheck:" -OUT=$(staticcheck $PKG/... 2>&1 | grep --invert-match -E "((example|vendor)/)") +OUT=$(staticcheck "$PKG/..." 2>&1 | grep --invert-match -E "((example|vendor)/)") if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi if [ -n "$PROBLEM" ]; then exit 1; fi