forked from Qortal/q-blog
8 lines
397 B
Bash
Executable File
8 lines
397 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Lists <img> tags likely missing alt= attribute (heuristic).
|
|
set -euo pipefail
|
|
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo .)"
|
|
OUT="$ROOT/reports/phase1-$(date +%Y%m%d-%H%M%S)-img-no-alt.txt"
|
|
grep -RIn --include='*.{tsx,jsx,ts,js}' '<img\b' "$ROOT/src" | awk -F: '{path=$1;line=$2;rest=$0; if (rest !~ /alt=/) print $0}' | tee "$OUT" || true
|
|
echo "Wrote $OUT"
|