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
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
ROOT=`realpath $(dirname $0)/..`
# Currently here only lists the packages that already addressed all warnings for gradual code repair.
# That means we don't allow adding new warnings to any of package in list. And eventually, the
# list will be replaced by find command.
declare -a pkgs=("pkg/builder" "pkg/builder" "pkg/crd" "pkg/logger" "pkg/buildermgr" "pkg/fission-cli" "cmd/fission-cli")
for pkg in "${pkgs[@]}"
do
find ${ROOT}/${pkg} -type d |grep -v influxdb | xargs -I@ staticcheck @
done