File tree
Expand file treeCollapse file tree1 file changed
+5
-4
lines changed Expand file treeCollapse file tree1 file changed
+5
-4
lines changed Original file line number | Diff line number | Diff line change |
---|
|
1 | 1 | #!/bin/bash
|
2 | 2 |
|
3 | 3 | # Fail on any error
|
4 |
| -set -eo pipefail |
| 4 | +set -eo |
5 | 5 |
|
6 | 6 | # Display commands being run
|
7 | 7 | set -x
|
8 | 8 |
|
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 |
10 | 10 | # about its output once).
|
11 |
| -if [[ `go version` != *"go1.12"* ]]; then |
| 11 | +if [[ `go version` != *"go1.13"* ]]; then |
12 | 12 | exit 0
|
13 | 13 | fi
|
14 | 14 |
|
@@ -26,7 +26,8 @@ git diff go.sum | tee /dev/stderr | (! read)
|
26 | 26 | pwd
|
27 | 27 |
|
28 | 28 | # 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 | + |
30 | 31 | gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read)
|
31 | 32 | goimports -l . 2>&1 | tee /dev/stderr | (! read)
|
32 | 33 |
|
|
You can’t perform that action at this time.
0 commit comments