From e4def7875520aef0643e83698e397abe229a8953 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Oct 2019 13:02:36 +0200 Subject: 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 Message-Id: <20191024110237.30963-19-armbru@redhat.com> --- scripts/qapi/parser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index e800876ad1..6c45a00cf4 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")) -- cgit v1.2.3