Skip to content

Commit

Permalink
Add go format checking on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
pravj committed Apr 21, 2017
1 parent 9bb200e commit 55c9a9d
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 55c9a9d

Please sign in to comment.