需要先安装 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

 

相关文章:

  • 2021-07-03
  • 2022-01-05
  • 2018-05-23
  • 2022-02-09
  • 2021-08-06
  • 2022-01-22
  • 2022-12-23
  • 2021-09-08
猜你喜欢
  • 2021-09-17
  • 2022-02-09
  • 2021-09-03
  • 2021-10-31
  • 2022-02-09
相关资源
相似解决方案