aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-10-24 13:02:36 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-10-29 07:35:16 +0100
commite4def7875520aef0643e83698e397abe229a8953 (patch)
treead03c6caae370252b8c920e95e399f9222f68b6d /scripts/qapi
parentb3cdff10e5e82ba7b99c59ab3089883f6bb85ed8 (diff)
downloadqemu-e4def7875520aef0643e83698e397abe229a8953.zip
qemu-e4def7875520aef0643e83698e397abe229a8953.tar.gz
qemu-e4def7875520aef0643e83698e397abe229a8953.tar.bz2
qapi: Polish reporting of bogus member documentation
Improve error messages from the following documented members are not in the declaration: a the following documented members are not in the declaration: aa, bb to the more concise documented member 'a' does not exist documented members 'aa', 'bb' do not exist Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191024110237.30963-19-armbru@redhat.com>
Diffstat (limited to 'scripts/qapi')
-rw-r--r--scripts/qapi/parser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index e800876..6c45a00 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -566,5 +566,7 @@ class QAPIDoc(object):
if bogus:
raise QAPISemError(
self.info,
- "the following documented members are not in "
- "the declaration: %s" % ", ".join(bogus))
+ "documented member%s '%s' %s not exist"
+ % ("s" if len(bogus) > 1 else "",
+ "', '".join(bogus),
+ "do" if len(bogus) > 1 else "does"))