]> go.fuhry.dev Git - fsnotify.git/commitdiff
add gofmt check to Travis CI
authorNathan Youngman <git@nathany.com>
Wed, 31 Dec 2014 03:32:53 +0000 (20:32 -0700)
committerNathan Youngman <git@nathany.com>
Wed, 31 Dec 2014 03:32:53 +0000 (20:32 -0700)
.travis.yml

index f6082d91cb9bfc6784f1c98f85537d69cc896a5b..ae26b4435ed53a864a19238ca319238ce050d744 100644 (file)
@@ -4,6 +4,9 @@ language: go
 go:
   - 1.4
 
+before_script:
+  - FIXED=$(go fmt ./... | wc -l); if [ $FIXED -gt 0 ]; then echo "gofmt - $FIXED file(s) not formatted correctly, please run gofmt to fix this." && exit 1; fi
+
 # not yet https://github.com/travis-ci/travis-ci/issues/2318
 os:
   - linux