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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus member documentation
Date: Wed, 15 Mar 2017 08:46:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eric Blake <address@hidden> writes:

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

Nice to have, but whether it would be worth the error recovery
complications is doubtful.

> Reviewed-by: Eric Blake <address@hidden>

Thanks!



reply via email to

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