Skip to content

Commit

Permalink
Merge pull request #52 from pravj/travis-gofmt
Browse files Browse the repository at this point in the history
Add go format checking on travis
  • Loading branch information
elliotchance authored Apr 21, 2017
2 parents 9bb200e + 55c9a9d commit f92a6b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.gofmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ -n "$(gofmt -l .)" ]; then
echo "Go code is not properly formatted. Use 'gofmt'."
gofmt -d .
exit 1
fi
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ before_install:
fi
script:
- . ./.travis.gofmt.sh
# Run the unit tests first
- |
set -e
Expand Down

0 comments on commit f92a6b3

Please sign in to comment.