#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

echo "Inline TODO/FIXME audit"
echo "Target: $ROOT_DIR/frontend/src + $ROOT_DIR/backend"
echo

if ! rg -n "TODO|FIXME|XXX" \
  "$ROOT_DIR/frontend/src" \
  "$ROOT_DIR/backend" \
  -g '*.vue' \
  -g '*.js' \
  -g '*.ts' \
  -g '*.scss' \
  -g '*.sql' \
  --glob '!**/dist/**' \
  --glob '!**/node_modules/**' \
  --glob '!**/package-lock.json'; then
  echo "No inline TODO/FIXME/XXX markers found in product code."
fi
