1 Star 1 Fork 0

GUANGYU WANG / amqp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pre-commit 931 Bytes
一键复制 编辑 原始数据 按行查看 历史
Sean Treadway 提交于 2017-02-03 14:40 . Go vet fixed in #238
#!/bin/sh
GOFMT_FILES=$(gofmt -l .)
if [ -n "${GOFMT_FILES}" ]; then
printf >&2 'gofmt failed for the following files:\n%s\n\nplease run "gofmt -w ." on your changes before committing.\n' "${GOFMT_FILES}"
exit 1
fi
GOLINT_ERRORS=$(golint ./... | grep -v "Id should be")
if [ -n "${GOLINT_ERRORS}" ]; then
printf >&2 'golint failed for the following reasons:\n%s\n\nplease run 'golint ./...' on your changes before committing.\n' "${GOLINT_ERRORS}"
exit 1
fi
GOVET_ERRORS=$(go tool vet *.go 2>&1)
if [ -n "${GOVET_ERRORS}" ]; then
printf >&2 'go vet failed for the following reasons:\n%s\n\nplease run "go tool vet *.go" on your changes before committing.\n' "${GOVET_ERRORS}"
exit 1
fi
if [ -z "${NOTEST}" ]; then
printf >&2 'Running short tests...\n'
env AMQP_URL= go test -short -v | egrep 'PASS|ok'
if [ $? -ne 0 ]; then
printf >&2 'go test failed, please fix before committing.\n'
exit 1
fi
fi
Go
1
https://gitee.com/macheals/amqp.git
git@gitee.com:macheals/amqp.git
macheals
amqp
amqp
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891