From 90970dc0b939b75fc30077d8b3f1e67cb5103981 Mon Sep 17 00:00:00 2001 From: David Poros Date: Mon, 21 Oct 2019 14:55:53 +0200 Subject: [PATCH] Fix linter - Remove verbosity from go vet - Fix staticcheck regex --- scripts/lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index 48c7853..26c27ff 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -12,7 +12,7 @@ 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 -v=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 $PKG/... 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