GNOME Bugzilla – Bug 710478
gtkdoc-mkdb: Don't complain about annotations with hyphen
Last modified: 2014-06-06 15:42:57 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. */
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
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*)*$%
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.
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
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
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
Created attachment 265398 [details] [review] tests: Add a test case for functions having a rename-to annotation
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.