Newer
Older
openstack-caracal-ipv4 / scripts / repo-lint.sh
#!/usr/bin/env bash
# scripts/repo-lint.sh [--record-clientdocs-sweep] [repo-root]
#
# Thin runner for scripts/repo_lint.py (DOCFIX-074) -- static repo hygiene lint.
# Mutates NOTHING -- except under --record-clientdocs-sweep (DOCFIX-104), which
# rewrites ONLY clientdocs/sweep-receipt.txt (the L7 sweep marker) and then
# lints as usual. See the .py docstring for the check catalog (L1-L7).
# Exit: 0 clean | 1 FAIL findings | 2 warnings only.  ASCII + LF.
set -uo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
command -v python3 >/dev/null 2>&1 || { echo "FAIL: python3 required"; exit 1; }
FLAGS=(); ROOT=""
for a in "$@"; do
  case "$a" in
    --*) FLAGS+=("$a") ;;
    *)   ROOT="$a" ;;
  esac
done
python3 "$HERE/repo_lint.py" ${FLAGS[@]+"${FLAGS[@]}"} "${ROOT:-$HERE/..}"