Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
check-fmt: trying to fix the build in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Souza committed Dec 16, 2014
1 parent 5791d0a commit 83777fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ before_script:
- if [ "$TRAVIS_REPO_SLUG" != "tsuru/gandalf" ]; then cd ..; mv gandalf ../tsuru; cd ../tsuru/gandalf; fi
script:
- make test GO_EXTRAFLAGS=-x
- rm -rf Godeps
- ./check-fmt.sh
services: mongodb
19 changes: 18 additions & 1 deletion check-fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,26 @@ then
do
echo "- ${file}"
done
echo
status=1
fi

go get golang.org/x/tools/cmd/goimports
out=`goimports -l .`
if [ "${out}" != "" ]
then
echo "ERROR: there are files that need to be formatted with goimports"
echo
echo "Files:"
for file in $out
do
echo "- ${file}"
done
status=1
fi


go get golang.org/x/tools/cmd/vet
`go vet ./... > .vet 2>&1`
out=`cat .vet`
if [ "${out}" != "" ]
Expand All @@ -33,5 +50,5 @@ END
status=1
fi

rm .vet || /bin/true
rm .vet || true
exit $status

0 comments on commit 83777fd

Please sign in to comment.