Skip to content

Instantly share code, notes, and snippets.

@aybabtme
Last active August 29, 2015 13:57
Show Gist options
  • Save aybabtme/9820626 to your computer and use it in GitHub Desktop.
Save aybabtme/9820626 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
PROJECTROOT=$GOPATH/src/github.com/<you>/<repo>
cd $PROJECTROOT
echo "Vetting project."
go vet || exit 1
echo "...ok"
echo "Checking for missing error handling."
errcheck ./... || exit 2
echo "...ok"
echo "Linting project."
golint **/*.go || exit 3 # won't fail since golint always returns 0
echo "...ok"
echo "Testing project."
go test ./... || exit 4
echo "...ok"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment