Update staticcheck version and fix all warnings (#1381)

This commit is contained in:
Ta-Ching Chen
2019-11-05 18:09:12 +08:00
committed by GitHub
parent 93d4b88d84
commit b9a5588ca9
43 changed files with 122 additions and 219 deletions
+5 -5
View File
@@ -14,12 +14,12 @@ then
fi
# Get staticcheck
STATICCHECK_VERSION=2019.1.1
if [ ! -f $TOOL_DIR/staticcheck ]
STATICCHECK_VERSION=2019.2.3
if [ ! -f $TOOL_DIR/staticcheck ] || (staticcheck -version | grep -v $STATICCHECK_VERSION)
then
curl -LO https://github.com/dominikh/go-tools/releases/download/${STATICCHECK_VERSION}/staticcheck_linux_amd64
chmod +x staticcheck_linux_amd64
mv staticcheck_linux_amd64 $TOOL_DIR/staticcheck
curl -LO https://github.com/dominikh/go-tools/releases/download/${STATICCHECK_VERSION}/staticcheck_linux_amd64.tar.gz
tar xzvf staticcheck_linux_amd64.tar.gz
mv staticcheck/staticcheck $TOOL_DIR/staticcheck
fi
K8SCLI_DIR=$HOME/k8scli