mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Merge branch 'marka-xmllint-html' into 'main'
Check for errors in html files See merge request isc-projects/bind9!5242
This commit is contained in:
commit
e204b5c413
@ -420,6 +420,7 @@ misc:
|
||||
- sh util/check-categories.sh
|
||||
- if git grep SYSTEMTESTTOP -- ':!.gitlab-ci.yml'; then echo 'Please use relative paths instead of $SYSTEMTESTTOP.'; exit 1; fi
|
||||
- bash util/unused-headers.sh
|
||||
- bash util/xmllint-html.sh
|
||||
needs: []
|
||||
artifacts:
|
||||
paths:
|
||||
|
@ -1993,3 +1993,4 @@
|
||||
./util/tabify-changes SH 2004,2007,2012,2016,2018,2019,2020,2021
|
||||
./util/unused-headers.sh SH 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/xmllint-html.sh SH 2021
|
||||
|
21
util/xmllint-html.sh
Normal file
21
util/xmllint-html.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/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
|
Loading…
x
Reference in New Issue
Block a user