Skip to content

Commit

Permalink
Use grep -E in lint.sh to make it compatible with BSD grep (#67)
Browse files Browse the repository at this point in the history
Use grep -E in lint.sh to make it compatible with BSD grep

Fixes #64
  • Loading branch information
maksimov authored and zimmski committed Dec 3, 2016
1 parent e41fa83 commit 7eb553d
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,11 +12,11 @@ OUT=$(errcheck $PKG/...)
if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi

echo "go vet:"
OUT=$(go tool vet -all=true -v=true $ROOT_DIR 2>&1 | grep --invert-match -P "(Checking file|\%p of wrong type|can't check non-constant format)")
OUT=$(go tool 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)")
if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi

echo "golint:"
OUT=$(golint $PKG/... | grep --invert-match -P "(method DiffPrettyHtml should be DiffPrettyHTML)")
OUT=$(golint $PKG/... | grep --invert-match -E "(method DiffPrettyHtml should be DiffPrettyHTML)")
if [ $(echo "$OUT\c" | wc -l) -ne 0 ]; then echo "$OUT"; PROBLEM=1; fi

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

0 comments on commit 7eb553d

Please sign in to comment.