Skip to content

Commit 3893fa7

Browse files
committed
Fix shellcheck warnings
1 parent 31bc1ac commit 3893fa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/lint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ if [ -z ${PKG+x} ]; then echo "PKG is not set"; exit 1; fi
44
if [ -z ${ROOT_DIR+x} ]; then echo "ROOT_DIR is not set"; exit 1; fi
55

66
echo "gofmt:"
7-
OUT=$(gofmt -l -s $ROOT_DIR 2>&1 | grep --invert-match -E "(/(example|vendor))")
7+
OUT=$(gofmt -l -s "$ROOT_DIR" 2>&1 | grep --invert-match -E "(/(example|vendor))")
88
if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi
99

1010
echo "errcheck:"
11-
OUT=$(errcheck $PKG/... 2>&1 | grep --invert-match -E "(/(example|vendor))")
11+
OUT=$(errcheck "$PKG/..." 2>&1 | grep --invert-match -E "(/(example|vendor))")
1212
if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi
1313

1414
echo "go vet:"
15-
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)")
15+
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)")
1616
if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi
1717

1818
echo "golint:"
1919
OUT=$(golint ./... 2>&1 | grep --invert-match -E "(^(example|vendor))")
2020
if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi
2121

2222
echo "staticcheck:"
23-
OUT=$(staticcheck $PKG/... 2>&1 | grep --invert-match -E "((example|vendor)/)")
23+
OUT=$(staticcheck "$PKG/..." 2>&1 | grep --invert-match -E "((example|vendor)/)")
2424
if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi
2525

2626
if [ -n "$PROBLEM" ]; then exit 1; fi

0 commit comments

Comments
 (0)