[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!
- [Qemu-devel] [PATCH for-2.9 27/47] qapi2texi: Generate documentation for variant members, (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
- [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
- [Qemu-devel] [PATCH for-2.9 36/47] tests/qapi-schema: Improve coverage of bogus member docs, Markus Armbruster, 2017/03/13