File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22

33
# Fail on any error
4-
set -eo pipefail
4+
set -eo
55

66
# Display commands being run
77
set -x
88

9-
# Only run the linter on go1.12, since it needs type aliases (and we only care
9+
# Only run the linter on go1.13, since it needs type aliases (and we only care
1010
# about its output once).
11-
if [[ `go version` != *"go1.12"* ]]; then
11+
if [[ `go version` != *"go1.13"* ]]; then
1212
exit 0
1313
fi
1414

@@ -26,7 +26,8 @@ git diff go.sum | tee /dev/stderr | (! read)
2626
pwd
2727

2828
# Look at all .go files (ignoring .pb.go files) and make sure they have a Copyright. Fail if any don't.
29-
git ls-files "*[^.pb].go" | xargs grep -L "\(Copyright [0-9]\{4,\}\)" 2>&1 | tee /dev/stderr | (! read)
29+
find . -type f -name "*.go" ! -name "*.pb.go" -exec grep -L "\(Copyright [0-9]\{4,\}\)" {} \; 2>&1 | tee /dev/stderr | (! read)
30+
3031
gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read)
3132
goimports -l . 2>&1 | tee /dev/stderr | (! read)
3233

0 commit comments

Comments
 (0)