mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qapi: Check feature documentation against the schema
Commit f3ed93d545
"qapi: Allow documentation for features" neglected
to check documentation against the schema. Fix that: check them the
same way we check arguments.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191024110237.30963-20-armbru@redhat.com>
This commit is contained in:
parent
e4def78755
commit
e151941d1b
8 changed files with 27 additions and 51 deletions
|
@ -0,0 +1 @@
|
|||
doc-bad-feature.json:3: documented member 'a' does not exist
|
|
@ -1,5 +1,4 @@
|
|||
# Features listed in the doc comment must exist in the actual schema
|
||||
# BUG: nonexistent @a is not rejected
|
||||
|
||||
##
|
||||
# @foo:
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
module None
|
||||
object q_empty
|
||||
enum QType
|
||||
prefix QTYPE
|
||||
member none
|
||||
member qnull
|
||||
member qnum
|
||||
member qstring
|
||||
member qdict
|
||||
member qlist
|
||||
member qbool
|
||||
module doc-bad-feature.json
|
||||
command foo None -> None
|
||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||
doc symbol=foo
|
||||
body=
|
||||
|
||||
feature=a
|
||||
a
|
|
@ -0,0 +1,2 @@
|
|||
doc-undoc-feature.json: In command 'foo':
|
||||
doc-undoc-feature.json:9: feature 'undoc' lacks documentation
|
|
@ -1,5 +1,4 @@
|
|||
# Doc comment must cover all features
|
||||
# BUG: missing documentation for @undoc not caught
|
||||
|
||||
##
|
||||
# @foo:
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
module None
|
||||
object q_empty
|
||||
enum QType
|
||||
prefix QTYPE
|
||||
member none
|
||||
member qnull
|
||||
member qnum
|
||||
member qstring
|
||||
member qdict
|
||||
member qlist
|
||||
member qbool
|
||||
module doc-undoc-feature.json
|
||||
command foo None -> None
|
||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||
feature undoc
|
||||
feature doc
|
||||
doc symbol=foo
|
||||
body=
|
||||
|
||||
feature=doc
|
||||
documented feature
|
Loading…
Add table
Add a link
Reference in a new issue