Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
- Remove verbosity from go vet
- Fix staticcheck regex
  • Loading branch information
David Poros committed Oct 21, 2019
1 parent 92e1544 commit 90970dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ 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:"
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

0 comments on commit 90970dc

Please sign in to comment.