Eric Blake <ebl...@redhat.com> writes: > On 3/23/21 4:40 AM, Markus Armbruster wrote: >> 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 <arm...@redhat.com> >> --- > >> +++ b/qapi/pragma.json >> @@ -31,10 +31,27 @@ >> # Externally visible types whose member names may use uppercase >> 'member-name-exceptions': [ # visible in: >> 'ACPISlotType', # query-acpi-ospm-status >> + 'AcpiTableOptions', # -acpitable >> + 'BlkdebugSetStateOptions', # blockdev-add, -blockdev >> + 'BlockDeviceInfo', # query-block >> + 'BlockDeviceStats', # query-blockstats >> + 'BlockDeviceTimedStats', # query-blockstats >> + 'BlockIOThrottle', # block_set_io_throttle >> + 'BlockInfo', # query-block >> 'BlockdevVmdkAdapterType', # blockdev-create (to match VMDK spec) >> 'BlockdevVmdkSubformat', # blockdev-create (to match VMDK spec) >> + 'ColoCompareProperties', # object_add, -object >> + 'FilterMirrorProperties', # object_add, -object >> + 'FilterRedirectorProperties', # object_add, -object >> + 'FilterRewriterProperties', # object_add, -object >> + 'InputLinuxProperties', # object_add, -object >> + 'NetdevTapOptions', # netdev_add, query-netdev, -netdev >> + 'PciBusInfo', # query-pci >> + 'PciDeviceInfo', # query-pci >> + 'PciMemoryRegion', # query-pci >> 'QapiErrorClass', # QMP error replies >> 'UuidInfo', # query-uuid >> + 'VncClientInfo', # query-vnc, query-vnc-servers, ... >> 'X86CPURegister32' # qom-get of x86 CPU properties >> # feature-words, filtered-features >> ] } } > > I was worried the list might be even longer. And as before, we might > have future patches that want to add aliases and/or deprecate the old > spellings, as long as introspection can easily see new spellings. > > At any rate, I'm in agreement with letting the computer flag new > instances instead of relying on me to notice during review.
Saves us review - fix up cycles. Everybody wins. >> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json >> index 2b08b761c2..fb17eebde3 100644 >> --- a/qga/qapi-schema.json >> +++ b/qga/qapi-schema.json >> @@ -19,6 +19,10 @@ >> # Whitelists to permit QAPI rule violations; think twice before you > > Did you want to fix this instance of the word 'Whitelists' somewhere in > the series? There's more than just this one. We can replace them on top if we care. >> # add to them! >> { 'pragma': { >> + # Types whose member names may use '_' >> + 'member-name-exceptions': [ >> + 'GuestAgentInfo' >> + ], >> # Commands allowed to return a non-dictionary: >> 'command-returns-exceptions': [ >> 'guest-file-open', > > Reviewed-by: Eric Blake <ebl...@redhat.com> Thanks!