Skip to content

Commit

Permalink
travis: check gofmt, capture errors from golint
Browse files Browse the repository at this point in the history
golint does not exit with code!=0 on errors, so travis build
will continue with success, therefore using "test -z".

Adding gofmt check.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
  • Loading branch information
ahmetb committed Jan 12, 2017
1 parent 5216d9c commit 9d11fa1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ before_install:

script:
- go vet -x ./...
- golint ./...
- test -z "$(golint ./...)"
- test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
- go test -v ./...
- go test -covermode=count -coverprofile=profile.cov

after_script:
- goveralls -coverprofile=profile.cov -service=travis-ci
- goveralls -coverprofile=profile.cov -service=travis-ci

0 comments on commit 9d11fa1

Please sign in to comment.