Merge pull request #114 from colincross/gofmt

Enforce gofmt in travis
This commit is contained in:
colincross 2016-08-11 11:17:39 -07:00 committed by GitHub
commit fcaf58b591
3 changed files with 9 additions and 1 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

@ -15,6 +15,7 @@ before_script:
- source .travis.fix-fork.sh
script:
- ./.travis.gofmt.sh
- go test ./...
- mkdir stage
- cd stage

View file

@ -265,7 +265,7 @@ func parseBuildParams(scope scope, params *BuildParams) (*buildDef,
b := &buildDef{
Comment: comment,
Rule: rule,
Rule: rule,
}
if !scope.IsRuleVisible(rule) {