From 3e2236287d48b2adcce0b179190a2a647adc7e48 Mon Sep 17 00:00:00 2001 From: Umanga Chapagain Date: Mon, 15 Mar 2021 16:57:25 +0530 Subject: [PATCH] pass all packages at once to logcheck passing all packages at once to logcheck reduces the time taken by linter. Signed-off-by: Umanga Chapagain --- hack/verify-structured-logging.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hack/verify-structured-logging.sh b/hack/verify-structured-logging.sh index 30f21b95a90..c1bd0e090e6 100755 --- a/hack/verify-structured-logging.sh +++ b/hack/verify-structured-logging.sh @@ -45,16 +45,13 @@ kube::util::check-file-in-alphabetical-order "${migrated_packages_file}" migrated_packages=() while IFS='' read -r line; do - migrated_packages+=("$line") + migrated_packages+=("$KUBE_ROOT/$line") done < <(cat "${migrated_packages_file}") -# TODO: Improve concurrancy here ret=0 -for package in "${migrated_packages[@]}"; do - GOOS=linux logcheck "$KUBE_ROOT/$package" || ret=$? - GOOS=windows logcheck "$KUBE_ROOT/$package" || ret=$? -done +GOOS=linux logcheck "${migrated_packages[@]}" || ret=$? +GOOS=windows logcheck "${migrated_packages[@]}" || ret=$? if [ $ret -eq 0 ]; then echo "Structured logging static check is passed :)."