mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Enforce event naming rules
Event names should be ALL_CAPS with words separated by underscore. Enforce this. The only offenders are in tests/. Fix them. Existing test event-case covers the new error. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-14-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
00ffe242d6
commit
d4f4cae8de
11 changed files with 22 additions and 34 deletions
|
@ -45,7 +45,9 @@ def check_name_str(name, info, source):
|
|||
|
||||
def check_name_upper(name, info, source):
|
||||
stem = check_name_str(name, info, source)
|
||||
# TODO reject '[a-z-]' in @stem
|
||||
if re.search(r'[a-z-]', stem):
|
||||
raise QAPISemError(
|
||||
info, "name of %s must not use lowercase or '-'" % source)
|
||||
|
||||
|
||||
def check_name_lower(name, info, source,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue