| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Instead of going down with a for the user inexplicable backtrace,
emit a warning asking said user to file a bug including the
comment block in question.
Thanks to Alexandre Rostovtsev <tetromino@gentoo.org> for
proposing something similar in bug #690850
https://bugzilla.gnome.org/show_bug.cgi?id=690850
|
|
|
|
|
|
|
|
|
|
| |
A completely empty GTK-Doc comment block (/**\n*/) resulted
in an unfriendly backtrace, complaining about an
"AttributeError: 'NoneType' object has no attribute 'comment'"
This fixes the issue and adds a test case.
https://bugzilla.gnome.org/show_bug.cgi?id=690850
|
|
|
|
|
|
| |
We don't know how many apps do this, but at least ibus had one.
https://bugzilla.gnome.org/show_bug.cgi?id=689354
|
|
|
|
|
|
|
|
|
|
| |
This doesn't change anything, really, except that you don't have
to read a whole page of code just to realize that nothing else
happens with that line and we go on processing the next.
Putting the continue statements there makes it a bit more readable.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
If there is no comment block description, DocBlock().comment
should be None. This results in the removal of unneeded blank
lines in the output of DocBlock().to_gtk_doc and hence the .c
files generated by misc/update-glib-annotations.py
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
This patch adds a test for and implements a more generic solution to
GTK-Doc commit 47abcd53b8489ebceec9e394676512a181c1f1f6
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
These are remnants from the original prototype and are no
longer used.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
| |
and add paragraph break tests.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
| |
... instead of having a secondary hard-coded list. This results
in the removal of giscanner/annotationpatterns.py to prevent a
circular import.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From Python's documentation:
Python offers two different primitive operations based on
regular expressions: match checks for a match only at the
beginning of the string, while search checks for a match
anywhere in the string (this is what Perl does by default).
The different behavior between match() and search() doesn't
matter in our case and conceptually we are checking if a
piece of text matches a certain pattern, so match() is a
better fit.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
| |
DocOptions already has a position attribute, no need to overwrite it
when the position of DocBlock or DocTag is set, hence the
set_position methods are no longer needed.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
Lost a couple of hours hunting down a failed test case (from the
annotationparser work about to land) due to this not being clear...
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
The order of the "options" key/value pairs returned by
DocOption().all() should be identical to the order in
which they where stored. Hence replace the dict usage
with odict.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
This makes it possible to run the upcoming annotationparser.py
tests with both Python 2 and Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
... in favor of "for key in dict: value=dict[key]"
and "dict.iteritems()". This makes it possible to
run the upcoming annotationparser.py tests with both
Python 2 and Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
| |
It simply looks better...
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
Including:
- handle things in the logical order encountered (first colon,
then annotations)
- correctly report column when missing a colon on the identifier part
- small type fixes
- remove no longer useful "parameter/tag expected" warnings
|
|
|
|
|
|
|
|
|
| |
This reverts commit f41525d54f53edd9b0d665397f7c6c755ee3616b and
adds a more complete solution as the original commit only handled
empty lines between the GTK-Doc comment block start token "/**" and
the identifier.
https://bugzilla.gnome.org/show_bug.cgi?id=673806
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current logic in _parse_comment_block of the annotationparser
check the identifier and use variables that only makes sense if a
result was returned (column_offset, original_line). This patch
indent the logic so it is only triggered if a result is found.
Otherwise it returns None as expected by call chain
"parse > parse_comment_block > _parse_comment_block":
ie in "parse":
comment_block = self.parse_comment_block(comment)
if comment_block is not None:
This still raises a lot of warnings but does not abort while generating
gir for libgnomekbd, mutter or telepathy-glib (those thus have to be
tweaked not to call g-ir-scanner with --warn-error at least until the
parser mask those false positives or the doc from those projects is
fixed to comply with the behaviour expected by giscanner).
https://bugzilla.gnome.org/show_bug.cgi?id=673806
|
|
|
|
|
|
|
|
| |
Most cases in validate() were already simply calls to _validate_option()
with particular arguments; this extracts the code from the remaining
options to their own methods, making the dispatch table more legible.
https://bugzilla.gnome.org/show_bug.cgi?id=670985
|
|
|
|
|
|
|
|
| |
"Maximium" is not an English word. Even if corrected to "maximum" (which
is), "at maximum" is not conventional usage: "at most" is more
idiomatic.
https://bugzilla.gnome.org/show_bug.cgi?id=670985
|
|
|
|
|
|
|
|
|
|
| |
Previously, the validation code compared each option name to a constant
(such as OPT_ALLOW_NONE) which expands to the string used in a source
file, and if they matched it would typically pass that same string to
_validate_option(). But the annotation name was written out longhand
each time, which seemed strange to me.
https://bugzilla.gnome.org/show_bug.cgi?id=670985
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids tags overwriting parameters if they happen to
share the same name. For example, this was triggered by
valid code in libgnome-keyring.
tests/scanner/regress.c and tests/scanner/regress.h test
written by Colin Walters <walters@verbum.org>.
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
|
| |
Only parse doc comments for the files we pass in
on the command line to g-ir-scanner, not the included dependencies.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=657202
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
| |
If we're done parsing parameters, previously we would simply eat lines that looked like
@foo: blah blah
Example is in gtkcssprovider.c.
https://bugzilla.gnome.org/show_bug.cgi?id=656504
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were eating any line form "* [A-Za-z]: " as a tag,
but this is a problem since e.g. gtk/gtk/gtkcssprovder.c had literal
CSS e.g. block: which erroneously matched.
Fix this by only accepting particular tags, similar to what gtk-doc
does (although we accept a superset, e.g. transfer too).
https://bugzilla.gnome.org/show_bug.cgi?id=656458
|
|
|
|
|
|
| |
For generating documentation, we actually want to preserve these.
https://bugzilla.gnome.org/show_bug.cgi?id=656389
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=655149
|
|
|
|
|
|
| |
So methods such as gtk_drag_dest_set() can be put inside Gtk.Widget
https://bugzilla.gnome.org/show_bug.cgi?id=639945
|
|
|
|
|
| |
Preserve the section names and write them out on the class/record/
interface.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=561264
|
|
|
|
|
|
| |
Might as well be liberal here, as long as we have a test case.
https://bugzilla.gnome.org/show_bug.cgi?id=631690
|
|
|
|
|
|
|
|
| |
The annotation parser changed to be stricter about annotation content,
but we introduced a regression where a : in the documentation would
wrongly cause the annotation to be skipped.
https://bugzilla.gnome.org/show_bug.cgi?id=630862
|
| |
|
|
|
|
|
| |
But disable the printing by default since it messes up
the generated file. And fix a couple of typos
|
| |
|
| |
|
|
|
|
|
| |
Allow closures without annotations to avoid having
to duplicate the parameter name.
|
| |
|
|
|
|
|
| |
All option annotations, which uses parenthesis are now
properly validated for number of values they expect
|
| |
|
| |
|