summaryrefslogtreecommitdiff
path: root/src/check-doc-syntax.sh
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-01-28 22:10:20 -0500
committerBehdad Esfahbod <behdad@behdad.org>2008-01-28 22:10:20 -0500
commit52cc603db1a805a0b3a8d7eba3171cd2785f10a7 (patch)
treefb3f36d4fc92f09afb3318d4315098d71d8aed10 /src/check-doc-syntax.sh
parentb790c5a6bcdd890c16d21753407188ed200ce445 (diff)
downloadcairo-52cc603db1a805a0b3a8d7eba3171cd2785f10a7.tar.gz
[doc] Stricter syntax check for type names, update test
Diffstat (limited to 'src/check-doc-syntax.sh')
-rwxr-xr-xsrc/check-doc-syntax.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh
index a7e8d5a3e..7b0908ff6 100755
--- a/src/check-doc-syntax.sh
+++ b/src/check-doc-syntax.sh
@@ -17,12 +17,13 @@ if grep "$enum_regexp" $FILES; then
echo " sed -i 's@$enum_regexp@\\1%\\2@' *.h *.c *.cpp"
fi
-type_regexp='^\([/ ][*] .*[^#]\)\<\(cairo[0-9a-z_]*_t\>\)'
+type_regexp='^[/ ][*]\( .*[^#]\| \)\<\(cairo[0-9a-z_]*_t\>\($\|[^:]$\|[^:].\)\)'
if grep "$type_regexp" $FILES; then
status=1
- echo Error: some type names in the docs are not prefixed by hash sign.
- echo Fix this by running the following sed command as many times as needed:
- echo " sed -i 's@$type_regexp@\\1#\\2@' *.h *.c *.cpp"
+ 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 collon.
+ echo Fix this by searching for the following regexp in the above files:
+ echo " '$type_regexp'"
fi
func_regexp='^\([/ ][*] .*[^#]\)\<\(cairo_[][<>/0-9a-z_]*\> \?[^][ <>(]\)'