Skip to content

Commit 197093a

Browse files
ronaldtseni4
authored andcommitted
ci(man-pages): filter asciidoc-py SyntaxWarning noise from stderr check
asciidoc-py < 10.2.1 emits Python SyntaxWarnings from its own config on Python 3.12+, which tripped the zero-stderr policy on ubuntu-24.04. Filter that line, as git ci/test-documentation.sh does.
1 parent 4965fab commit 197093a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎ci/check-man-pages.sh‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ normalize() {
3333
| tr -s '[:space:]' ' '
3434
}
3535

36+
# Toolchain noise that does not indicate a documentation problem:
37+
# asciidoc-py < 10.2.1 emits Python SyntaxWarnings from its own config
38+
# on Python 3.12+ (git's ci/test-documentation.sh filters the same).
39+
filter_err() {
40+
sed -e '/SyntaxWarning: invalid escape sequence/d' "$1"
41+
}
42+
3643
fail=0
3744

3845
for page in $PAGES; do
@@ -46,7 +53,7 @@ for page in $PAGES; do
4653
( cd "$name.py.d" && xsltproc --nonet ../cmake/Modules/adoc-manpage.xsl "../$name.xml" ) 2> "$name.py.d.err"
4754

4855
for err in "$name.ad.err" "$name.py.err" "$name.py.d.err"; do
49-
if [ -s "$err" ]; then
56+
if [ -n "$(filter_err "$err")" ]; then
5057
echo "error: $page: $(basename "$err") is not empty:" >&2
5158
cat "$err" >&2
5259
fail=1

0 commit comments

Comments
 (0)