docs: Make HTML checks reliable

Fail the QLogic documentation check when tidy is unavailable or any
HTML file does not validate. Mark both HTML check targets as phony so
a file named check cannot silently suppress validation.
This commit is contained in:
Gleb Chesnokov
2026-08-21 19:58:59 +03:00
parent 5a56e2339b
commit 82b5d44a0e
2 changed files with 13 additions and 1 deletions
+11 -1
View File
@@ -1,2 +1,12 @@
check:
find -name '*.html' | while read f; do tidy -e < "$$f" | sed "s|^-e|$$f|"; done
@command -v tidy >/dev/null 2>&1 || { \
echo "Error: tidy is required to check the documentation." >&2; \
exit 1; \
}
@status=0; \
for f in $$(find . -name '*.html'); do \
tidy -e "$$f" || status=$$?; \
done; \
exit $$status
.PHONY: check
+2
View File
@@ -8,3 +8,5 @@ check:
tidy -e "$$f" || status=$$?; \
done; \
exit $$status
.PHONY: check