Check code is formatted in travis

pull/446/head
Ernesto Jiménez 2017-05-27 19:05:42 +01:00
parent eb84487cae
commit dd57c7b68a
2 changed files with 8 additions and 0 deletions

7
.travis.gofmt.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
if [ -n "$(gofmt -l .)" ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
fi

View File

@ -10,4 +10,5 @@ go:
- tip
script:
- ./.travis.gofmt.sh
- go test -v ./...