aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-03-23 10:40:21 +0100
committerMarkus Armbruster <armbru@redhat.com>2021-03-23 22:31:05 +0100
commit05ebf841efac494d8bd1f6d74642c3e9a3df4c19 (patch)
treebf8c88a6f5c35c54af8b5ff582c0b94de28fb95c /scripts/qapi/parser.py
parente744708a7783624292f8c405ca840f50a10b0003 (diff)
qapi: Enforce command naming rules
Command names should be lower-case. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma command-name-exceptions. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-25-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi/parser.py')
-rw-r--r--scripts/qapi/parser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index c16b8b6995..58267c3db9 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -132,6 +132,9 @@ class QAPISchemaParser:
raise QAPISemError(info,
"pragma 'doc-required' must be boolean")
info.pragma.doc_required = value
+ elif name == 'command-name-exceptions':
+ self._check_pragma_list_of_str(name, value, info)
+ info.pragma.command_name_exceptions = value
elif name == 'command-returns-exceptions':
self._check_pragma_list_of_str(name, value, info)
info.pragma.command_returns_exceptions = value