diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-03-23 10:40:21 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-03-23 22:31:05 +0100 |
commit | 05ebf841efac494d8bd1f6d74642c3e9a3df4c19 (patch) | |
tree | bf8c88a6f5c35c54af8b5ff582c0b94de28fb95c /docs | |
parent | e744708a7783624292f8c405ca840f50a10b0003 (diff) |
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 'docs')
-rw-r--r-- | docs/devel/qapi-code-gen.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt index 23e9823019..10e9a0f829 100644 --- a/docs/devel/qapi-code-gen.txt +++ b/docs/devel/qapi-code-gen.txt @@ -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 === |