mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
Replace test script with Makefile test targets
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PKGS=$(go list ./... | grep -v /vendor)
|
||||
FORMATTABLE=$(ls -d */ | grep -v -E '(vendor/|examples/)')
|
||||
LINTABLE=$(go list ./... | grep -v -E '(vendor/|pb$)')
|
||||
|
||||
go test $PKGS -cover
|
||||
go vet $PKGS
|
||||
|
||||
echo "Checking gofmt..."
|
||||
fmtRes=$(gofmt -l $FORMATTABLE)
|
||||
if [ -n "${fmtRes}" ]; then
|
||||
echo -e "gofmt checking failed:\n${fmtRes}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "Checking golint..."
|
||||
lintRes=$(echo $LINTABLE | xargs -n 1 golint)
|
||||
if [ -n "${lintRes}" ]; then
|
||||
echo -e "golint checking failed:\n${lintRes}"
|
||||
exit 2
|
||||
fi
|
||||
Reference in New Issue
Block a user