1 Star 0 Fork 0

g-golang / fk-deployr

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run-tests.sh 713 Bytes
一键复制 编辑 原始数据 按行查看 历史
Steve Kemp 提交于 2020-02-07 22:03 . Improve our CI process
#!/bin/sh
# Install tools to test our code-quality.
go get -u golang.org/x/lint/golint
go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
go get -u honnef.co/go/tools/cmd/staticcheck
# Run the static-check tool.
t=$(mktemp)
staticcheck -checks all ./... > $t
if [ -s $t ]; then
echo "Found errors via 'staticcheck'"
cat $t
rm $t
exit 1
fi
rm $t
# At this point failures cause aborts
set -e
# Run the linter
echo "Launching linter .."
golint -set_exit_status ./...
echo "Completed linter .."
# Run the shadow-checker
echo "Launching shadowed-variable check .."
go vet -vettool=$(which shadow) ./...
echo "Completed shadowed-variable check .."
# Run golang tests
go test ./...
1
https://gitee.com/g-golang/fk-deployr.git
git@gitee.com:g-golang/fk-deployr.git
g-golang
fk-deployr
fk-deployr
master

搜索帮助