chore: remove duplicate hook setup

Keep pre-commit configuration as the single validation path and tolerate deleted tracked Markdown during link validation.
This commit is contained in:
windyboy
2026-08-23 17:58:19 +08:00
parent 7bc7d3f99b
commit c7dc4fd25c
3 changed files with 5 additions and 6 deletions
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(git rev-parse --show-toplevel)"
cd "$repo_root"
exec scripts/validate-repo.sh
-1
View File
@@ -1 +0,0 @@
AGENTS.md
+5
View File
@@ -108,6 +108,11 @@ files = sorted(set(pathlib.Path(f) for f in tracked + untracked))
link_re = re.compile(r'\[[^\]]*\]\(([^)]+)\)')
errors = []
for f in files:
# `git ls-files` includes paths deleted in the working tree. They cannot
# contain links and must not make validation fail before their deletion is
# staged.
if not f.exists():
continue
try:
text = f.read_text(encoding='utf-8')
except UnicodeDecodeError: