Skip to content

Commit 7d2cf10

Browse files
dmitshurdsnet
authored andcommitted
Travis: Check for gofmt issues (#12)
The default test script is `go test -v ./...` according to Travis docs at https://docs.travis-ci.com/user/languages/go/#Default-Test-Script. Add an additional gofmt check to help catch formatting issues in PRs. This is motivated by a previous occurrence at #9 (comment). Also swap the order of Go versions 1.x and 1.6. 1.x is higher priority, so it makes more sense to run it first and report issues right away. 1.6 is lower priority, so it's better to prioritize it lower. Use 2 space indent in the .yml file, which is consistent with the formatting in Travis documentation and examples.
1 parent 1537f48 commit 7d2cf10

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
sudo: false
22
language: go
33
go:
4-
- 1.6
5-
- 1.x
4+
- 1.x
5+
- 1.6
6+
script:
7+
- diff -u <(echo -n) <(gofmt -d .)
8+
- go test -v ./...

0 commit comments

Comments
 (0)