The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/scripts/travis_checker.sh

20 lines
381 B

#!/bin/bash
go test ./...
if [ $? -ne 0 ]; then
echo "Some tests failed"
exit 1
fi
if [ $(golint ./... | wc | awk '{print $1}') -gt 2 ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
fi
if [ -n "$(gofmt -l .)" ]; then
echo "go fmt error"
echo "Go code is not formatted:"
gofmt -d .
exit 1
else
echo "Go code is well formatted ;)"
fi