forked from fa/breadcrumb-the-shire
feat(search): refresh global search UI and align qa/docs updates
This commit is contained in:
56
bin/docs-drift-check.sh
Executable file
56
bin/docs-drift-check.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
repo_root="$(cd -- "${script_dir}/.." && pwd)"
|
||||
cd "${repo_root}"
|
||||
|
||||
scan_targets=(README.md CLAUDE.md docs .agents)
|
||||
scan_globs=(-g '*.md' -g '*.json' -g '!.agents/runs/**')
|
||||
|
||||
fail=0
|
||||
|
||||
check_legacy_pattern() {
|
||||
local pattern="$1"
|
||||
local label="$2"
|
||||
local matches
|
||||
matches="$(rg -n --pcre2 "${pattern}" "${scan_targets[@]}" "${scan_globs[@]}" || true)"
|
||||
if [[ -n "${matches}" ]]; then
|
||||
echo "[FAIL] ${label}"
|
||||
echo "${matches}"
|
||||
fail=1
|
||||
fi
|
||||
}
|
||||
|
||||
check_legacy_pattern 'config/settings\.php' 'Legacy docs reference to config/settings.php found'
|
||||
check_legacy_pattern 'config/router\.php' 'Legacy docs reference to config/router.php found'
|
||||
check_legacy_pattern '\bAPP_ROUTE_DEFINITIONS\b' 'Legacy docs reference to APP_ROUTE_DEFINITIONS found'
|
||||
check_legacy_pattern '\bAPP_PUBLIC_PATHS\b' 'Legacy docs reference to APP_PUBLIC_PATHS found'
|
||||
check_legacy_pattern 'data-search-key' 'Legacy global-search aside marker (data-search-key) found'
|
||||
|
||||
if [[ ! -f config/config.php.example ]]; then
|
||||
echo "[FAIL] Missing setup template: config/config.php.example"
|
||||
fail=1
|
||||
fi
|
||||
|
||||
required_setup_docs=(
|
||||
README.md
|
||||
docs/howto-docker-lokal.md
|
||||
docs/tutorial-01-erste-schritte.md
|
||||
docs/tutorial-03-setup-und-erster-login.md
|
||||
docs/howto-lokale-entwicklung.md
|
||||
)
|
||||
|
||||
for doc in "${required_setup_docs[@]}"; do
|
||||
if ! rg -q 'config/config\.php\.example' "${doc}"; then
|
||||
echo "[FAIL] Missing setup contract reference in ${doc}: config/config.php.example"
|
||||
fail=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${fail} -ne 0 ]]; then
|
||||
echo "[FAIL] docs drift checks failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[OK] docs drift checks passed"
|
||||
@@ -38,6 +38,9 @@ run_step "QG-006 PHP Style Check" \
|
||||
run_step "QG-008 Docs link integrity" \
|
||||
bin/docs-link-check.sh
|
||||
|
||||
run_step "QG-008 Docs drift contract" \
|
||||
bin/docs-drift-check.sh
|
||||
|
||||
run_step "QG-009 Codex skills sync" \
|
||||
bin/codex-skills-sync.sh --check
|
||||
|
||||
|
||||
Reference in New Issue
Block a user