summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2023-09-23 15:15:43 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2023-09-23 15:18:32 +0100
commit3648bf24f664d782441132a743b43b5a5c7d9bd8 (patch)
treeb063afce5db43aabf81bed5e0d35c2d6d6bf9ade
parentc74bd39df67ce4fb4d84d7a60009659326d5b5b0 (diff)
build: Fix program listing syntax check
The modern gtk-doc syntax for program listing is `|[ ... ]|`.
-rwxr-xr-xsrc/check-doc-syntax.sh6
1 files 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>/,/<\/programlisting>/d' | grep "$enum_regexp" | grep -v '#####'; then
+if echo $FILES | xargs grep . /dev/null | sed -e '/<programlisting>/,/<\/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>/,/<\/programlisting>/d' | grep -v "@Title" | grep "$type_regexp" | grep -v '#####'; then
+if echo $FILES | xargs grep . /dev/null | sed -e '/<programlisting>/,/<\/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>/,/<\/programlisting>/d' | grep "$func_regexp" | grep -v '^[^:]*: [*] [a-z_0-9]*:$' | grep -v '#####'; then
+if echo $FILES | xargs grep . /dev/null | sed -e '/<programlisting>/,/<\/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: