platform/common/scripts/svelte-check-show.sh
Andrey Sobolev 9103e96606
Some checks are pending
CI / uitest-qms (push) Waiting to run
CI / uitest-workspaces (push) Waiting to run
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Fix svelte-check errors (#8127)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2025-03-03 15:30:18 +07:00

19 lines
572 B
Bash
Executable File

#!/bin/sh
roots=$(rush list -p --json | grep "path" | cut -f 2 -d ':' | cut -f 2 -d '"')
files="svelte-check.log svelte-check-err.log"
for file in $roots; do
for check in $files; do
f="$file/.svelte-check/$check"
if [ -f $f ]; then
if grep -q "error" "$f"; then
if ! grep -q "0 errors" "$f"; then
if ! grep -q "error.ts" "$f"; then
echo "\nErrors in $f\n"
cat "$f" | grep -B1 "Error:" | grep -v "^--$" | sed "s/Error:/$(echo '\033[31m')Error:$(echo '\033[0m')/"
fi
fi
fi
fi
done
done