Skip to content

Commit

Permalink
check for format too (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
campoy authored Jul 6, 2017
1 parent d13eded commit 9f4311c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gofmt.travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#! /bin/bash

OUTPUT="$(go list ./... | grep -v vendor | xargs go fmt)"
if [ -n "$OUTPUT" ]; then
echo "Go code is not formatted, run gofmt on:" >&2
echo "$OUTPUT" >&2
false
fi
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ install:
- go get -u github.com/kisielk/errcheck
script:
- embedmd -d **/*.md
- bash .gofmt.travis.sh
- go list ./... | grep -v vendor | xargs go test
- go list ./... | grep -v vendor | xargs golint
- go list ./... | grep -v "vendor\|errcheck" | xargs errcheck
Expand Down

0 comments on commit 9f4311c

Please sign in to comment.