mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 01:40:13 +00:00
verify-govet-levee.sh: optimize "go list"
go list -find takes ~60% the time: $ time go list -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated|hack)/" | md5sum b5593b3f51f3b3cd08c33bbff9627d10 - real 0m2.687s user 0m3.624s sys 0m1.552s $ time go list -find -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated|hack)/" | md5sum b5593b3f51f3b3cd08c33bbff9627d10 - real 0m1.721s user 0m1.675s sys 0m1.197s https://github.com/kubernetes/kubernetes/pull/116166#discussion_r1123924871
This commit is contained in:
parent
fd8523aa08
commit
5331973fa5
@ -43,6 +43,6 @@ CONFIG_FILE="${KUBE_ROOT}/hack/testdata/levee/levee-config.yaml"
|
|||||||
targets=()
|
targets=()
|
||||||
while IFS='' read -r line; do
|
while IFS='' read -r line; do
|
||||||
targets+=("${line}")
|
targets+=("${line}")
|
||||||
done < <(go list -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated|hack)/")
|
done < <(go list --find -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated|hack)/")
|
||||||
|
|
||||||
go vet -vettool="${LEVEE_BIN}" -config="${CONFIG_FILE}" "${targets[@]}"
|
go vet -vettool="${LEVEE_BIN}" -config="${CONFIG_FILE}" "${targets[@]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user