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:
Markus Armbruster 2021-03-23 10:40:21 +01:00
parent e744708a77
commit 05ebf841ef
8 changed files with 62 additions and 31 deletions

View file

@ -149,6 +149,7 @@ prevent incomplete include files.
Syntax:
PRAGMA = { 'pragma': {
'*doc-required': BOOL,
'*command-name-exceptions': [ STRING, ... ],
'*command-returns-exceptions': [ STRING, ... ],
'*member-name-exceptions': [ STRING, ... ] } }
@ -160,6 +161,9 @@ pragma to different values in parts of the schema doesn't work.
Pragma 'doc-required' takes a boolean value. If true, documentation
is required. Default is false.
Pragma 'command-name-exceptions' takes a list of commands whose names
may contain '_' instead of '-'. Default is none.
Pragma 'command-returns-exceptions' takes a list of commands that may
violate the rules on permitted return types. Default is none.
@ -756,8 +760,8 @@ Any name (command, event, type, member, or enum value) beginning with
"x-" is marked experimental, and may be withdrawn or changed
incompatibly in a future release.
Pragma 'member-name-exceptions' lets you violate the rules on use of
upper and lower case. Use for new code is strongly discouraged.
Pragmas 'command-name-exceptions' and 'member-name-exceptions' let you
violate naming rules. Use for new code is strongly discouraged.
=== Downstream extensions ===