Skip to content

Commit f3682f4

Browse files
author
Katrina Owen
authored
Merge pull request #761 from jdsutherland/travis-gofmt
Require gofmt on Travis build
2 parents 4ae3f85 + 56d24b4 commit f3682f4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.travis.gofmt.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
cd "$(dirname $0)"
4+
if [ -n "$(go fmt ./...)" ]; then
5+
echo "Go code is not formatted, run 'go fmt github.com/exercism/cli/...'" >&2
6+
exit 1
7+
fi

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ install:
1212
- dep ensure
1313

1414
script:
15+
- ./.travis.gofmt.sh
1516
- go test -cover ./...

0 commit comments

Comments
 (0)