From 21a4f2a03791d48e367ea939763f120d0d82b65f Mon Sep 17 00:00:00 2001 From: Stas Maksimov Date: Sat, 3 Dec 2016 16:52:23 +0300 Subject: [PATCH 1/3] Use grep -E in lint.sh to make it compatible with BSD grep Fixes #64 --- scripts/lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index 080195f..a03a021 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -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 | /usr/bin/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/... | /usr/bin/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 From bf5b7ce905d084b27c0a5d5dd337944542768846 Mon Sep 17 00:00:00 2001 From: Stas Maksimov Date: Sat, 3 Dec 2016 16:55:42 +0300 Subject: [PATCH 2/3] Removing my local grep choice --- scripts/lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index a03a021..3dad05f 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -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 | /usr/bin/grep --invert-match -E "(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/... | /usr/bin/grep --invert-match -E "(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 From f53b318435892f7afe48c7fe78db1b459f474bda Mon Sep 17 00:00:00 2001 From: Stas Maksimov Date: Sat, 3 Dec 2016 16:52:23 +0300 Subject: [PATCH 3/3] Use grep -E in lint.sh to make it compatible with BSD grep Fixes #64 --- scripts/lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index 080195f..3dad05f 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -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