After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710478 - gtkdoc-mkdb: Don't complain about annotations with hyphen
gtkdoc-mkdb: Don't complain about annotations with hyphen
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.20
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-18 21:03 UTC by Stef Walter
Modified: 2014-06-06 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkdoc-mkdb: Don't complain about annotations with hyphen (1.01 KB, patch)
2013-10-18 21:03 UTC, Stef Walter
none Details | Review
tests: Add a test case for functions having a rename-to annotation (1.65 KB, patch)
2013-12-05 14:19 UTC, Carlos Garcia Campos
committed Details | Review
gtkdoc-mkdb: Don't complain about annotations with other chars (1.09 KB, patch)
2014-01-05 15:58 UTC, Stef Walter
committed Details | Review
gtkdoc-mkdb: Don't complain about annotations with other chars (1.09 KB, patch)
2014-01-05 22:06 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
tests: Add a test case for functions having a rename-to annotation (1.70 KB, patch)
2014-01-05 22:06 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stef Walter 2013-10-18 21:03:04 UTC
Certain introspection annotations like 'allow-none' have hyphens in them.
Attached patch fixes gtkdoc-mkdb complaint about such annotations.

Otherwise we see errors like this:

../../../gcr/gcr-certificate.c:260: warning: Symbol name not found at the start of the comment block.

For gtk-doc blocks like this:

		/**
		 * GcrCertificate:label: (allow-none)
		 *
		 * A readable label for this certificate.
		 */
Comment 1 Stef Walter 2013-10-18 21:03:58 UTC
Created attachment 257668 [details] [review]
gtkdoc-mkdb: Don't complain about annotations with hyphen

Certain annotations like 'allow-none' have hyphens in them.
Fix gtkdoc-mkdb complaint about such annotations
Comment 2 Carlos Garcia Campos 2013-12-05 14:04:08 UTC
This is also a problem for methods having an identifier annotation containing a hyphen too. The patch doesn't work for thje specific case of (rename-to SYMBOL) because the symbol typically has underscores, like in:

* gtk_tree_store_set_valuesv: (rename-to gtk_tree_store_set)

In this case the regular expression should also include the _:

m%^\s*([\w:-]*\w)\s*:?\s*(\([-_a-z ]+\)\s*)*$%
Comment 3 Carlos Garcia Campos 2013-12-05 14:19:20 UTC
Created attachment 263591 [details] [review]
tests: Add a test case for functions having a rename-to annotation

This is a test case for this bug. With Stef's patch updated as I suggested this test pass.
Comment 4 Stef Walter 2014-01-05 15:58:02 UTC
Created attachment 265379 [details] [review]
gtkdoc-mkdb: Don't complain about annotations with other chars

Certain annotations like 'allow-none' have hyphens in them.
Others like 'rename_to symbol_name_1' have numbers and underscores
Fix gtkdoc-mkdb complaints about such annotations
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-05 22:06:00 UTC
The following fixes have been pushed:
f534508 gtkdoc-mkdb: Don't complain about annotations with other chars
d4cf2dc tests: Add a test case for functions having a rename-to annotation
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-05 22:06:10 UTC
Created attachment 265397 [details] [review]
gtkdoc-mkdb: Don't complain about annotations with other chars

Certain annotations like 'allow-none' have hyphens in them.
Others like 'rename_to symbol_name_1' have numbers and underscores
Fix gtkdoc-mkdb complaints about such annotations
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-05 22:06:13 UTC
Created attachment 265398 [details] [review]
tests: Add a test case for functions having a rename-to annotation
Comment 8 sandro 2014-06-06 15:42:57 UTC
The same regular expression causes the same complains in two other cases:

- if you have a virtual function with uppercase characters (virtual myMethodUpperCase).

- if you have value with some float number (value 1.0e-5).

Both cases would be fixed adding \.A-Z to the regular expression.