[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus memb
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus member documentation |
Date: |
Tue, 14 Mar 2017 15:58:41 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/13/2017 01:18 AM, Markus Armbruster wrote:
> check_definition_doc() checks for member documentation without a
> matching member. It laboriously second-guesses what members
> QAPISchema._def_exprs() will create. That's a stupid game.
>
> Move the check into QAPISchema.check(), where the members are known.
> Delegate the actual checking to new QAPIDoc.check().
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> scripts/qapi.py | 38
> ++++++++++-------------------
> tests/qapi-schema/doc-bad-union-member.err | 1 +
> tests/qapi-schema/doc-bad-union-member.exit | 2 +-
> tests/qapi-schema/doc-bad-union-member.out | 11 ---------
> 4 files changed, 15 insertions(+), 37 deletions(-)
Nice diffstat.
> +++ b/tests/qapi-schema/doc-bad-union-member.err
> @@ -0,0 +1 @@
> +tests/qapi-schema/doc-bad-union-member.json:3: The following documented
> members are not in the declaration: a, b
Nice that you're able to report all problems within the doc, rather than
stopping at the first. (Wish we could do the same about the overall
.json file, but that's harder, and out of scope for this series)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH for-2.9 46/47] qapi: Make pylint a bit happier, (continued)
- [Qemu-devel] [PATCH for-2.9 27/47] qapi2texi: Generate documentation for variant members, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redundant, drop, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus member documentation, Markus Armbruster, 2017/03/13
- Re: [Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus member documentation,
Eric Blake <=
- [Qemu-devel] [PATCH for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 42/47] qapi: enum_types is a list used like a dict, make it one, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 45/47] qapi: Drop unused .check_clash() parameter schema, Markus Armbruster, 2017/03/13