Skip to content

Commit 8ac3e02

Browse files
committed
scripts: add golint script again that ignores generated code
1 parent 51619f0 commit 8ac3e02

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ script:
1010
- ./scripts/licensecheck.sh
1111
- ./scripts/codegeneration.sh
1212
- go build ./...
13-
- golint -set_exit_status ./...
13+
- ./scripts/golint.sh
1414
- go vet ./...
1515
- go test -v ./...

scripts/golint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Verify that all files are correctly golint'd, with the exception of
4+
# generated code.
5+
EXIT=0
6+
GOLINT=$(golint ./... | grep -v ".gen.go")
7+
8+
if [[ ! -z $GOLINT ]]; then
9+
echo "$GOLINT"
10+
EXIT=1
11+
fi
12+
13+
exit $EXIT

0 commit comments

Comments
 (0)