mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 15:48:20 +00:00
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>
This commit is contained in:
@ -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'):
|
||||
|
Reference in New Issue
Block a user