From 05ebf841efac494d8bd1f6d74642c3e9a3df4c19 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 23 Mar 2021 10:40:21 +0100 Subject: 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 Message-Id: <20210323094025.3569441-25-armbru@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/parser.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/qapi/parser.py') 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 -- cgit 1.4.1