Skip to content

Commit a811d66

Browse files
committed
Add golint to CI checks
1 parent 4e9213f commit a811d66

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ go:
1515
before_install:
1616
# install goreturns for linting
1717
- go get -u github.com/sqs/goreturns
18+
- go get -u golang.org/x/lint/golint
1819

1920
script:
2021
- make lint

lint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
# Use Goreturns as a linter to pick up spacing formatting. Return exit code 1 if there are any errors
44
# Runs gofmt + goimports
5-
5+
# go returns
66
OUTPUT="$(goreturns -d -e cmd/ pkg/)"
77
test -z "$OUTPUT" || ((>&2 echo -e "$OUTPUT" "\ntry running 'make fmt'") && exit 1)
8+
9+
# golint
10+
golint -set_exit_status ./...

0 commit comments

Comments
 (0)