| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This reverts commit 0839e696e9fbc1942ac5c61054de3b47e9578152.
This was accidentally picked up by my 'git bz apply' against the bug as
I was getting ready to push the last set of changes.
|
|
|
|
|
|
|
|
|
| |
The old annotationparser.py happily parsed this, but
giscanner/girwriter.py never serialized an allow-none
attribute to the .gir file and girepository/girparser.c
never looked for an allow-none attribute either.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
| |
There was some dependence on the serial test harness in the recent tests
that were added. Update GI to use the parallel test harness to avoid
incompatibilities.
https://bugzilla.gnome.org/show_bug.cgi?id=721477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Python unittest module parameterization support to gi-tester through the
use of a "TESTARGS" variable. Use the Automake test harness along with
gi-tester for running the Python annotationparser tests.
Add tests/scanner/annotationparser/Makefile.am and localize testing
rules and EXTRA_DIST setup to this file. Specific Python tests can now be
run as follows:
cd tests/scanner/annotationparser
make check TESTS=test_patterns.py TESTARGS=TestTagValueStability
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update both test_parser.py and test_patterns.py to dynamically generate
TestCase sub-classes rather than modify a statically defined one.
Use unittest.TestSuite to queue up the generated test cases via the
"load_tests" hook.
Use underscores instead of periods as a seperator for dynamically generated
test cases and methods to match Python identifiers.
Beyond general cleanup, these changes will help the ability to specify
Python tests individually.
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
|
|
|
|
| |
GTK-Doc has trouble parsing multiline parameter
description fields if the first word of a continuation
line is "returns". We're already doing the right thing
but make sure we continue to do so in the future
https://bugzilla.gnome.org/show_bug.cgi?id=708445
|
|
|
|
|
|
|
|
|
|
|
| |
When encountering /**/ in the source, parse_gtk_doc_comment()
would be executed (due to the /** part starting a GTK-Doc
comment block) and would happily consume the / and everything
up until the next comment block was closed or EOF, thus
consuming a whole block of C code...
Encoutered in the wild here:
https://git.gnome.org/browse/clutter-gst/tree/clutter-gst/clutter-gst-player.c?id=03f0d8f48bd7f60e582e6185cb73a07038e8d55d#n1926
|
|
|
|
|
|
| |
Makes our GTK-Doc comment block rewriting tool halt on
such issues, requireing user intervention instead of writing
back even more bogus data.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
GTK-Doc comment block fixer tool will refuse to rewrite source
files that generated errors (indicating a source->parse tree->source
would result in information being lost), but will happily continue
on warnings (which do not result in information being lost).
|
|
|
|
|
|
|
|
|
| |
GTK-Doc parameter description fields are allowed to span
multiple lines, tag description fields are allowed to span
multiple lines and paragraphs. A tool fixing/rewriting
GTK-Doc comment blocks in source files would need to have
description fields parsed and stored (almost) exactly as
they appear in the source file.
|
| |
|
| |
|
|
|
|
|
|
| |
so we can later use them to re-write source files containing
broken GTK-Doc comment blocks where /** is preceded by and/or
*/ is followed by code...
|
|
|
|
|
|
|
|
| |
- annotations on the identifier (formerly g-i specific tags) have
never been validated before, so fix this
- removes duplicate validation code from GtkDocTag and GtkDocParameter
- remove repeated validation code doing the same thing as
annotationparser from maintransformer...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After discussing a different issue with the GTK-Doc maintainers,
we learned that our g-i specific top level tags should never have
existed in the first place. The prefered notation for annotations
that apply to the identifier should be written on the identifier
line, for example like what we already do with (skip).
As a result, this patch deprecates g-i specific top level tags and
implements them as annotations on the identifier instead but still
keeps support for malformed comment blocks using g-i specific top
level tags.
This means that all annotated code "out there" will continue to work
just fine with this version of g-i, but when a developer decides to
fix deprecation warnings in his/her comment blocks, the dependency
on g-i needs to be raised to a version that contains at least this
patch. #676133
https://bugzilla.gnome.org/show_bug.cgi?id=676133
|
|
|
|
|
|
|
|
|
|
| |
- remove annotations regex, restore proper parens parsing
- drop weird DocOption() storage class and use lists/dicts
as appropriate
- make GtkDocAnnotations a simple OrderedDict subclass instead
of a weird hybrid dict/list storage class
- Deprecate Attribute: tag, replace with (attributes) annotation
on the identifier
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
No need to track what type of identifier we've found as we don't
use that information later on. Continue searching for an identifier
if it's not found on the first line like gtkdoc-mkdb does.
|
|
|
|
|
| |
and move it downwards after DocTag, DocOptions etc for
easier reading
|
|
|
|
|
| |
Accepted by old version of annotationparser.py and actually
encountered in the wild. Internaly normalize to 'Returns:'.
|
|
|
|
|
|
|
|
| |
Turns out gtkdoc-mkdb has always accepted identifier parts
with and without a delimiter after the identifier_name field,
so it is safe to only require it when annotations are present or
in other words, when there are actually multiple fields to be
seperated...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not yet being used but will be in the future by
annotationparser.py to signal the difference between
message.WARNING:
something is wrong but the comment block can still
be parsed and serialized back into a comment block
without information being lost
message.ERROR:
something is wrong and the comment block can *not*
be parsed and serialized back into a comment block
without information being lost
Different tools can then act accordingly. Nothing will
change for g-ir-scanner but this will be important for
the GTK-Doc comment block rewriting tool to prevent
extremely broken input leading to even more broken
output...
|
|
|
|
|
|
|
|
|
|
| |
Normalize deprecated @Varargs [1] and named __VA_ARGS__ [2]
notations in as single location, add tests. Remove special
casing in maintransformer as it is no longer a special case
(tests/warn/unknown-parameter.h passes).
[1] https://git.gnome.org/browse/gtk-doc/commit/gtkdoc-mkdb.in?id=4c9d4db0e264d403b301dad9be1c290134846d03
[1] https://git.gnome.org/browse/gtk-doc/commit/gtkdoc-mkdb.in?id=55c78181d6ae1606bdf7885e9caed70a484127ec
|
|
|
|
|
| |
Makes it consistent with the parse_comment_blocks() and
_parse_comment_block() methods.
|
|
|
|
|
|
| |
Clarify the purpose of what up until now was know as the
AnnotationParser() class, as it does more than just extracting
annotations, it parses the complete GTK-Doc comment block.
|
|
|
|
| |
Simply because they are called description fields on GTK-Doc parts...
|
|
|
|
|
|
|
| |
It serves as a GTK-Doc "field" separator, so delimiter seems
like a better name. This also makes the distinction between the
colon used in property/signal names (which is not a "field"
separator) and the GTK-Doc "field" separator a bit more clear.
|
|
|
|
|
|
|
| |
Makes it easier to understand the difference between
an annotation and an option, which are written as
"(annotation option1=value1 option2=value2 ...)" in
GTK-Doc comment blocks.
|
|
|
|
|
|
| |
It makes sense to let test_parser.py check everything which
is focused purely on testing GTK-Doc comment blocks
(ie annotationparser.py functionality).
|
|
|
|
|
| |
Empty lines do get removed or added sometimes, so make sure we see
those in our diff output.
|
| |
|
| |
|
|
|
|
|
| |
We're already validating input .xml files so no need
to duplicate this...
|
|
|
|
|
|
|
|
| |
This is more of a handy developer tool than something
that is always expected to be executed as part of the
test suite, so we don't add a hard dependency on xmllint.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
The <parser> element can then hold both the expected
<docblock> parse tree and the warning/error messages
emitted by the parser in a future <messages> child
element.
|
|
|
|
|
|
| |
We'll start testing parser warning/error messages and
serialized output later on so this will make it easier to
see what's parser input and output...
|
|
|
|
| |
closer to __main__, where it's actually used...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Version in our tree is a wee bit outdated. For example,
later work will introduce an utf8 encoded python source
file which our old pep8.py does not yet understand (yeah,
it really was *that* ancient)...
Updated from:
https://raw.github.com/jcrocholl/pep8/1.4.5/pep8.py
Takes 552c1f1525e37a30376790151c1ba437776682c5,
f941537d1c0a40f0906490ed160db6c79af572d3,
5a4afe2a77d0ff7d9fea13dd93c3304a6ca993de and
a17f157e19bd6792c00321c8020dca5e5a281f45 into account...
https://bugzilla.gnome.org/show_bug.cgi?id=699535
|
|
|
|
|
|
|
|
|
|
|
| |
This comment block, as found in the wild via
https://bugzilla.gnome.org/show_bug.cgi?id=690850
has a couple of elements to make it an interesting
test case:
- a colon on the first line
- stuff between parens on the first line
but it still isn't a valid identifier. Add it here
anyway to make sure we don't regress.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
.iterfind() is new in 2.7, but we claim 2.6 support, as I use on
RHEL6.
|