Commit b4265c90 authored by Mark Andrews's avatar Mark Andrews
Browse files

Check for errors in html files

xmllint doesn't know about the HTML 5 <section> tag so filter
those out.

(cherry picked from commit ea0624b2)
parent 1203892f
Pipeline #76281 passed with stages
in 24 minutes and 48 seconds
......@@ -453,7 +453,7 @@ misc:
- perl -w util/update_copyrights < util/copyrights
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
- sh util/xmllint-html.sh
- sh util/check-win32util-configure
- sh util/check-categories.sh
needs: []
......
......@@ -4653,6 +4653,7 @@
./util/update_branches PERL 2005,2007,2012,2016,2018,2019,2020,2021
./util/update_copyrights PERL 1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021
./util/xc SH 2012,2013,2016,2018,2019,2020,2021
./util/xmllint-html.sh SH 2021
./version X 1998,1999,2000,2001,2003,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2016,2017,2018,2019,2020,2021
./win32utils/Configure PERL 2013,2014,2015,2016,2017,2018,2019,2020,2021
./win32utils/GeoIP.diff X 2013,2018,2019,2020,2021
......
#!/bin/sh -f
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
files=`git ls-files '*.html'`
if test -n "$files"
then
xmllint --noout --nonet --html $files 2>&1 |
awk 'BEGIN { status = 0; }
# suppress HTML 5 <section> tag errors
/HTML parser error : Tag section invalid/ { getline; getline; next; }
{ print; status = 1; }
END { exit status }'
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment