xiaozhi-esp32-server/scripts/westernization_audit.sh
lapy 7898b88b3e chore(audit): single Python implementation, no rg/python divergence
CI runs had no rg on the runner, so the bash script fell back to its python
branch with a different file set (no extension skips; sees gitignored tracked
files) and a different verdict than local rg runs. One deterministic scanner
now serves both: git ls-files walk, NUL sniff + extension skip for binary
blobs (model .cmo3/.can3/.moc3/.jit files decode to CJK-looking garbage),
allowlist for the opentype.js LCID table line, exception zones unchanged.
2026-10-12 17:24:17 +01:00

18 lines
521 B
Bash
Executable file

#!/usr/bin/env bash
# Thin wrapper around the Python implementation so CI (and muscle memory) can
# keep calling this script. All scan logic and the exception policy live in
# westernization_audit.py; keeping a single implementation guarantees CI and
# local runs agree.
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 is required for this audit." >&2
exit 1
fi
exec python3 scripts/westernization_audit.py