mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
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 <chapagainumanga@gmail.com>
This commit is contained in:
parent
9657dd77a3
commit
3e2236287d
@ -45,16 +45,13 @@ kube::util::check-file-in-alphabetical-order "${migrated_packages_file}"
|
|||||||
|
|
||||||
migrated_packages=()
|
migrated_packages=()
|
||||||
while IFS='' read -r line; do
|
while IFS='' read -r line; do
|
||||||
migrated_packages+=("$line")
|
migrated_packages+=("$KUBE_ROOT/$line")
|
||||||
done < <(cat "${migrated_packages_file}")
|
done < <(cat "${migrated_packages_file}")
|
||||||
|
|
||||||
|
|
||||||
# TODO: Improve concurrancy here
|
|
||||||
ret=0
|
ret=0
|
||||||
for package in "${migrated_packages[@]}"; do
|
GOOS=linux logcheck "${migrated_packages[@]}" || ret=$?
|
||||||
GOOS=linux logcheck "$KUBE_ROOT/$package" || ret=$?
|
GOOS=windows logcheck "${migrated_packages[@]}" || ret=$?
|
||||||
GOOS=windows logcheck "$KUBE_ROOT/$package" || ret=$?
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $ret -eq 0 ]; then
|
if [ $ret -eq 0 ]; then
|
||||||
echo "Structured logging static check is passed :)."
|
echo "Structured logging static check is passed :)."
|
||||||
|
Loading…
Reference in New Issue
Block a user