diff options
author | Markus Armbruster | 2021-03-23 10:40:21 +0100 |
---|---|---|
committer | Markus Armbruster | 2021-03-23 22:31:05 +0100 |
commit | 05ebf841efac494d8bd1f6d74642c3e9a3df4c19 (patch) | |
tree | bf8c88a6f5c35c54af8b5ff582c0b94de28fb95c /scripts/qapi/expr.py | |
parent | qapi: Enforce feature naming rules (diff) | |
download | qemu-05ebf841efac494d8bd1f6d74642c3e9a3df4c19.tar.gz qemu-05ebf841efac494d8bd1f6d74642c3e9a3df4c19.tar.xz 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/expr.py')
-rw-r--r-- | scripts/qapi/expr.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py index d778107c18..9193e68763 100644 --- a/scripts/qapi/expr.py +++ b/scripts/qapi/expr.py @@ -70,8 +70,9 @@ def check_defn_name_str(name, info, meta): if meta == 'event': check_name_upper(name, info, meta) elif meta == 'command': - check_name_lower(name, info, meta, - permit_upper=True, permit_underscore=True) + check_name_lower( + name, info, meta, + permit_underscore=name in info.pragma.command_name_exceptions) else: check_name_camel(name, info, meta) if name.endswith('Kind') or name.endswith('List'): |