summary refs log tree commit diff stats
path: root/scripts/qapi/source.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/source.py
parente744708a7783624292f8c405ca840f50a10b0003 (diff)
downloadfocaccia-qemu-05ebf841efac494d8bd1f6d74642c3e9a3df4c19.tar.gz
focaccia-qemu-05ebf841efac494d8bd1f6d74642c3e9a3df4c19.zip
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/source.py')
-rw-r--r--scripts/qapi/source.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/qapi/source.py b/scripts/qapi/source.py
index d8f9ec377f..03b6ede082 100644
--- a/scripts/qapi/source.py
+++ b/scripts/qapi/source.py
@@ -21,6 +21,8 @@ class QAPISchemaPragma:
     def __init__(self) -> None:
         # Are documentation comments required?
         self.doc_required = False
+        # Commands whose names may use '_'
+        self.command_name_exceptions: List[str] = []
         # Commands allowed to return a non-dictionary
         self.command_returns_exceptions: List[str] = []
         # Types whose member names may violate case conventions