Add static code analysis to CI test (#1197)

This commit is contained in:
Ta-Ching Chen
2019-06-02 14:29:38 +08:00
committed by GitHub
parent 1562cba420
commit 93d4f2c77a
23 changed files with 130 additions and 146 deletions
+16 -3
View File
@@ -6,6 +6,22 @@
set -e
TOOL_DIR=$HOME/tool
if [ ! -d $TOOL_DIR ]
then
mkdir -p $TOOL_DIR
fi
# Get staticcheck
STATICCHECK_VERSION=2019.1.1
if [ ! -f $TOOL_DIR/staticcheck ]
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
fi
K8SCLI_DIR=$HOME/k8scli
if [ ! -d $K8SCLI_DIR ]
@@ -52,9 +68,6 @@ then
curl https://sdk.cloud.google.com | bash
fi
# gcloud command
export PATH=${HOME}/google-cloud-sdk/bin:${PATH}
# ensure we have the gcloud binary
gcloud version