diff --git a/.githooks/pre-push b/.githooks/pre-push index e824202..09631c9 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -1,6 +1,10 @@ #!/usr/bin/env bash -# pre-push hook: typecheck + biome + lint-log-tags set -euo pipefail -echo "๐Ÿ” pre-push: running checks..." + +echo "๐Ÿ” Running check (tsc + biome + lint-log-tags)..." bun run check -echo "โœ… pre-push: all checks passed" + +echo "๐Ÿงช Running tests..." +bun run test + +echo "โœ… All checks passed!" diff --git a/scripts/lint-log-tags.sh b/scripts/lint-log-tags.sh index 64f092f..3b3700a 100755 --- a/scripts/lint-log-tags.sh +++ b/scripts/lint-log-tags.sh @@ -10,7 +10,7 @@ while IFS= read -r match; do file="${match%%:*}" rest="${match#*:}" line="${rest%%:*}" - tag=$(echo "$rest" | grep -oP '\.log\(\s*"\K[A-Za-z0-9]+') + tag=$(echo "$rest" | sed -n 's/.*\.log( *"\([A-Za-z0-9]*\)".*/\1/p') if echo "$tag" | grep -qiE '[ILOU]'; then echo " โŒ ${file}:${line} tag \"${tag}\" contains invalid Crockford Base32 char (I/L/O/U)" BAD=1