From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1135519-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6B531138334 for <garchives@archives.gentoo.org>; Thu, 2 Jan 2020 12:55:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2E36E09F3; Thu, 2 Jan 2020 12:55:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF5BCE09F8 for <gentoo-commits@lists.gentoo.org>; Thu, 2 Jan 2020 12:55:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 54B7934DE74 for <gentoo-commits@lists.gentoo.org>; Thu, 2 Jan 2020 12:55:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B613A8 for <gentoo-commits@lists.gentoo.org>; Thu, 2 Jan 2020 12:54:59 +0000 (UTC) From: "Ulrich Müller" <ulm@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org> Message-ID: <1577969001.2330779776b8ed53ec91629db2d2d56b65e64eb7.ulm@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: / X-VCS-Repository: proj/devmanual X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 2330779776b8ed53ec91629db2d2d56b65e64eb7 X-VCS-Branch: master Date: Thu, 2 Jan 2020 12:54:59 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5fdcdfe9-03ec-4329-8bf2-c34edd637c68 X-Archives-Hash: 0dd62d71903a37ecc929eef170f02c29 commit: 2330779776b8ed53ec91629db2d2d56b65e64eb7 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> AuthorDate: Sun Apr 28 16:24:51 2019 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Thu Jan 2 12:43:21 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=23307797 Makefile: add new app-text/tidy-html5 sanity check. This new PHONY "make tidy" target runs the tidy-html5 program, using a new .tidyrc file, to ensure that the HTML we have generated is free from certain problems. In particular, it should complain if bug 626032 ever resurfaces and there are duplicate identifiers in some document. Closes: https://bugs.gentoo.org/626032 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> [Command line options instead of .tidyrc file. Don't fail on first error.] Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 17be902..407decf 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,17 @@ validate: prereq @xmllint --noout --dtdvalid devbook.dtd $(XMLS) \ && echo "xmllint validation successful" +# Run app-text/tidy-html5 on the output to detect mistakes. +# We have to loop through them because otherwise tidy won't +# tell you which file contains a mistake. +tidy: $(HTMLS) + @for f in $(HTMLS); do \ + output=$$(tidy -q -errors --drop-empty-elements no $${f} 2>&1) \ + || { status=$$?; echo "Failed on $${f}:"; echo "$${output}"; }; \ + done; \ + exit $${status} + clean: rm -f $(HTMLS) $(IMAGES) _documents.js documents.js -.PHONY: all prereq validate clean +.PHONY: all prereq validate tidy clean