需要先安装 gometalinter工具
#!/bin/bash #should install #go get github.com/alecthomas/gometalinter #gometalinter --install --update CURDIR="$( cd "$( dirname "$0" )" && pwd )" export GOPATH=$CURDIR/.. echo GOPATH=$GOPATH dir=($GOPATH/src/logic/... $GOPATH/src/battle/...) for i in ${dir[@]} do echo checking $i echo ------------------------------------------------------ gometalinter.exe --disable=gosec --disable=errcheck --disable=golint --disable=gocyclo --exclude=test $i #gometalinter.exe --disable=gosec --disable=errcheck --disable=golint --disable=gocyclo --exclude=test --errors $i echo ------------------------------------------------------ echo done read -p "press any key to exit" -n 1 -r
有疑问加站长微信联系(非本文作者)