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 <arm...@redhat.com>
> ---
>  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 <ebl...@redhat.com>

-- 
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