Include tests in golint checks, fix warnings (#2180)

This commit is contained in:
Antoine Cotten 2018-03-07 17:37:30 +01:00 committed by Manuel Alejandro de Brito Fontes
parent 31306658f1
commit 86a3a63488
9 changed files with 30 additions and 29 deletions

View file

@ -23,10 +23,10 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
cd "${KUBE_ROOT}"
GOLINT=${GOLINT:-"golint"}
PACKAGES=($(go list ./... | grep -v /vendor/ | grep -v /test\/e2e/))
PACKAGES=($(go list ./... | grep -v /vendor/))
bad_files=()
for package in "${PACKAGES[@]}"; do
out=$("${GOLINT}" -min_confidence=0.9 "${package}")
out=$("${GOLINT}" -min_confidence=0.9 "${package}" | grep -v 'should not use dot imports' || :)
if [[ -n "${out}" ]]; then
bad_files+=("${out}")
fi