summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/struct-member-name-clash.json
diff options
context:
space:
mode:
authorMarkus Armbruster2021-03-23 10:40:23 +0100
committerMarkus Armbruster2021-03-23 22:31:43 +0100
commit5aceeac04de50e3a9d5c2a965379324659a94be0 (patch)
treedc467a25f992c721e8dd87fc2a1533809fbcf468 /tests/qapi-schema/struct-member-name-clash.json
parenttests/qapi-schema: Switch member name clash test to struct (diff)
downloadqemu-5aceeac04de50e3a9d5c2a965379324659a94be0.tar.gz
qemu-5aceeac04de50e3a9d5c2a965379324659a94be0.tar.xz
qemu-5aceeac04de50e3a9d5c2a965379324659a94be0.zip
qapi: Enforce struct member naming rules
Struct members, including command arguments, event data, and union inline base members, should use '-', not '_'. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma member-name-exceptions. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-27-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema/struct-member-name-clash.json')
-rw-r--r--tests/qapi-schema/struct-member-name-clash.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qapi-schema/struct-member-name-clash.json b/tests/qapi-schema/struct-member-name-clash.json
index 3fb69cc2ce..571acf05ce 100644
--- a/tests/qapi-schema/struct-member-name-clash.json
+++ b/tests/qapi-schema/struct-member-name-clash.json
@@ -1,4 +1,5 @@
# C member name collision
# Reject members that clash when mapped to C names (we would have two 'a_b'
# members).
+{ 'pragma': { 'member-name-exceptions': [ 'Oops' ] } }
{ 'struct': 'Oops', 'data': { 'a-b': 'str', 'a_b': 'str' } }