From 82b5d44a0e01a56111ed8d57103e2078ed48bbf1 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Fri, 21 Aug 2026 13:05:27 +0300 Subject: [PATCH] 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. --- qla2x00t/doc/Makefile | 12 +++++++++++- www/Makefile | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/qla2x00t/doc/Makefile b/qla2x00t/doc/Makefile index 069466a6c..82065bc80 100644 --- a/qla2x00t/doc/Makefile +++ b/qla2x00t/doc/Makefile @@ -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 diff --git a/www/Makefile b/www/Makefile index 506e18ae1..658ea0a81 100644 --- a/www/Makefile +++ b/www/Makefile @@ -8,3 +8,5 @@ check: tidy -e "$$f" || status=$$?; \ done; \ exit $$status + +.PHONY: check