Skip to content

Commit

Permalink
Merge pull request exercism#761 from jdsutherland/travis-gofmt
Browse files Browse the repository at this point in the history
Require gofmt on Travis build
  • Loading branch information
Katrina Owen authored Nov 9, 2018
2 parents 4ae3f85 + 56d24b4 commit f3682f4
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

cd "$(dirname $0)"
if [ -n "$(go fmt ./...)" ]; then
echo "Go code is not formatted, run 'go fmt github.com/exercism/cli/...'" >&2
exit 1
fi
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ install:
- dep ensure

script:
- ./.travis.gofmt.sh
- go test -cover ./...

0 comments on commit f3682f4

Please sign in to comment.