mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-03-20 16:43:20 +00:00
22 lines
428 B
Bash
Executable File
22 lines
428 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
PKGS=$(go list ./... | grep -v /vendor)
|
|
FORMATTABLE="./api ./config ./cmd ./sign"
|
|
|
|
go test $PKGS
|
|
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 $PKGS | xargs -n 1 golint)
|
|
if [ -n "${lintRes}" ]; then
|
|
echo -e "golint checking failed:\n${lintRes}"
|
|
exit 2
|
|
fi
|