Include tests in golint checks, fix warnings (#2180)
This commit is contained in:
parent
31306658f1
commit
86a3a63488
9 changed files with 30 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue