qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]