GNOME Bugzilla – Bug 711598
gtkdoc-scan doesn't ignore decorators containing parentheses
Last modified: 2014-02-09 11:50:58 UTC
Even if you pass the right regular expression in --ignore-decorator the global regexp never maches because it has a \b right after the decorator block. For example, libsoup is using --ignore-decorators='SOUP_DEPRECATED\w*\s*\([^)]*\)|SOUP_DEPRECATED\w*|SOUP_AVAILABLE\w*'. We have found the same problem in WebKit after introducing WEBKIT_DEPREACTER_FOR(), in our case it's even worse because we use the type in the previous line, and since the regexp fails, the whole function not detected and not included in the docs.
Created attachment 259171 [details] [review] gtkdoc-scan: Ignore decorators containing parentheses This fixes the problem and all tests keep passing.
Review of attachment 259171 [details] [review]: ::: gtkdoc-scan.in @@ +458,3 @@ # FUNCTION POINTER VARIABLES # $1 $3 $4 $5 + } elsif (m/^\s*(?:\b(?:extern|G_INLINE_FUNC|${IGNORE_DECORATORS})\s*)*((const\s+|G_CONST_RETURN\s+)?\w+)(\s+const)?\s*(\**)\s*\(\*\s*(\w+)\)\s*\(/o) { please ajust the ${1,...} as well
Comment on attachment 259171 [details] [review] gtkdoc-scan: Ignore decorators containing parentheses Pushed with the comments updated.
Actually this breaks the tests: $ make check Running suite(s): gtk-doc-tester ./tester-undeclared.txt:1:E: 1 undeclared symbols 75.0%: Checks 4, Failures: 1 FAIL: bugs.sh $ cat tests/bugs/docs/tester-undeclared.txt bug_711598 commit 21a0c5ea974dd5dfc2701e00853d4308be0d51ce Author: Stefan Sauer <ensonic@users.sf.net> Date: Wed Jan 22 23:12:16 2014 +0100 tests: fix the tests The void probably did ended up on the wrong line by mistake.
This is weird, because it passes for me, see: ============================================================================ Testsuite summary for gtk-doc 1.19.1 ============================================================================ # TOTAL: 7 # PASS: 7 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ The void was in that place on purpose, because it's the style used by webkit, which is what I was trying to fix.
This looks different here: 100 %: Checks 17, Failures: 0 PASS: tools.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: gobject.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: bugs.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: annotations.sh Running suite(s): gtk-doc-fail 100 %: Checks 4, Failures: 0 PASS: fail.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: empty.sh Running suite(s): gtk-doc-sanity 100 %: Checks 4, Failures: 0 PASS: sanity.sh ================== All 7 tests passed ==================