From 3648bf24f664d782441132a743b43b5a5c7d9bd8 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 23 Sep 2023 15:15:43 +0100 Subject: build: Fix program listing syntax check The modern gtk-doc syntax for program listing is `|[ ... ]|`. --- src/check-doc-syntax.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh index 762a48429..57bbc91fd 100755 --- a/src/check-doc-syntax.sh +++ b/src/check-doc-syntax.sh @@ -28,7 +28,7 @@ enum_regexp="\([^%@']\|^\)\<\(FALSE\|TRUE\|NULL\|CAIRO_[0-9A-Z_]*\)\($\|[^(A-Za- if test "x$SGML_DOCS" = x; then enum_regexp='^[^:]*:[/ ][*]\(\|[ \t].*\)'$enum_regexp\($\|[^:]\) fi -if echo $FILES | xargs grep . /dev/null | sed -e '//,/<\/programlisting>/d' | grep "$enum_regexp" | grep -v '#####'; then +if echo $FILES | xargs grep . /dev/null | sed -e '//,/<\/programlisting>/d' -e '/\|\[/,/\]\|/d' | grep "$enum_regexp" | grep -v '#####'; then stat=1 echo Error: some macros in the docs are not prefixed by percent sign. echo Fix this by searching for the following regexp in the above files: @@ -42,7 +42,7 @@ else type_regexp='\(.'$type_regexp'\)\|\('$type_regexp'.\)' fi -if echo $FILES | xargs grep . /dev/null | sed -e '//,/<\/programlisting>/d' | grep -v "@Title" | grep "$type_regexp" | grep -v '#####'; then +if echo $FILES | xargs grep . /dev/null | sed -e '//,/<\/programlisting>/d' -e '/\|\[/,/\]\|/d' | grep -v "@Title" | grep "$type_regexp" | grep -v '#####'; then stat=1 echo Error: some type names in the docs are not prefixed by hash sign, echo neither are the only token in the doc line followed by colon. @@ -56,7 +56,7 @@ if test "x$SGML_DOCS" = x; then fi # We need to filter out gtk-doc markup errors for program listings. -if echo $FILES | xargs grep . /dev/null | sed -e '//,/<\/programlisting>/d' | grep "$func_regexp" | grep -v '^[^:]*: [*] [a-z_0-9]*:$' | grep -v '#####'; then +if echo $FILES | xargs grep . /dev/null | sed -e '//,/<\/programlisting>/d' -e '/\|\[/,/\]\|/d' | grep "$func_regexp" | grep -v '^[^:]*: [*] [a-z_0-9]*:$' | grep -v '#####'; then stat=1 echo Error: some function names in the docs are not followed by parentheses. echo Fix this by searching for the following regexp in the above files: -- cgit v1.2.3