mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 17:18:42 +02:00
[check] Filter programlistings for check-doc-syntax.sh
We do not want to enforce the gtk-doc markup in the preformated examples, so run the files through sed to filter out <programlisting> before checking with the error detecting regexp.
This commit is contained in:
parent
e94126fb67
commit
afa4ff8df5
1 changed files with 8 additions and 2 deletions
|
|
@ -44,7 +44,10 @@ if test "x$SGML_DOCS" = x; then
|
||||||
else
|
else
|
||||||
type_regexp='\(.'$type_regexp'\)\|\('$type_regexp'.\)'
|
type_regexp='\(.'$type_regexp'\)\|\('$type_regexp'.\)'
|
||||||
fi
|
fi
|
||||||
if grep "$type_regexp" $FILES | grep -v '#####'; then
|
|
||||||
|
# We need to filter out gtk-doc markup errors for program listings.
|
||||||
|
files=`grep "$type_regexp" $FILES | grep -v '#####' | cut -d: -f1 | sort | uniq`
|
||||||
|
if test -n "$files" && sed -e '/<programlisting>/,/<\/programlisting>/d' $files | grep "$type_regexp" | grep -v '#####'; then
|
||||||
status=1
|
status=1
|
||||||
echo Error: some type names in the docs are not prefixed by hash sign,
|
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.
|
echo neither are the only token in the doc line followed by colon.
|
||||||
|
|
@ -56,7 +59,10 @@ func_regexp='\([^#]\|^\)\<\(cairo_[][<>/0-9a-z_]*\> \?[^][ <>(]\)'
|
||||||
if test "x$SGML_DOCS" = x; then
|
if test "x$SGML_DOCS" = x; then
|
||||||
func_regexp='^[/ ][*] .*'$func_regexp
|
func_regexp='^[/ ][*] .*'$func_regexp
|
||||||
fi
|
fi
|
||||||
if grep "$func_regexp" $FILES | grep -v '#####'; then
|
|
||||||
|
# We need to filter out gtk-doc markup errors for program listings.
|
||||||
|
files=`grep "$func_regexp" $FILES | grep -v '#####' | cut -d: -f1 | sort | uniq`
|
||||||
|
if test -n "$files" && sed -e '/<programlisting>/,/<\/programlisting>/d' $files | grep "$func_regexp" | grep -v '#####'; then
|
||||||
status=1
|
status=1
|
||||||
echo Error: some function names in the docs are not followed by parentheses.
|
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:
|
echo Fix this by searching for the following regexp in the above files:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue