qemu/docs
John Snow ef137a2241 docs/qapi-domain: add warnings for malformed field lists
Normally, Sphinx will silently fall back to its standard field list
processing if it doesn't match one of your defined fields. A lot of the
time, that's not what we want - we want to be warned if we goof
something up.

For instance, the canonical argument field list form is:

:arg type name: descr

This form is captured by Sphinx and transformed so that the field label
will become "Arguments:". It's possible to omit the type name and descr
and still have it be processed correctly. However, if you omit the type
name, Sphinx no longer recognizes it:

:arg: this is not recognized.

This will turn into an arbitrary field list entry whose label is "Arg:",
and it otherwise silently fails. You may also see failures for doing
things like using :values: instead of :value:, or :errors: instead of
:error:, and so on. It's also case sensitive, and easy to trip up.

Add a validator that guarantees all field list entries that are the
direct child of an ObjectDescription use only recognized forms of field
lists, and emit a warning (treated as error by default in most build
configurations) whenever we detect one that is goofed up.

However, there's still benefit to allowing arbitrary fields -- they are
after all not a Sphinx invention, but perfectly normal docutils
syntax. Create an allow list for known spellings we don't mind letting
through, but warn against anything else.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20250311034303.75779-27-jsnow@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2025-03-11 10:10:57 +01:00
..
_templates
about vfio queue: 2025-03-07 07:39:21 +08:00
config
devel * scripts: dump stdin on meson-buildoptions error 2025-03-10 13:40:05 +08:00
interop docs/devel: add a codebase section 2025-01-17 10:45:49 +00:00
specs docs/specs: Add aspeed-intc 2025-03-09 14:36:53 +01:00
sphinx docs/qapi-domain: add warnings for malformed field lists 2025-03-11 10:10:57 +01:00
sphinx-static docs/qapi-domain: add :ifcond: directive option 2025-03-11 10:10:57 +01:00
spin
system hw/vmapple/vmapple: Add vmapple machine type 2025-03-04 14:45:34 +01:00
tools qemu-nbd: Allow users to adjust handshake limit 2025-02-11 13:45:46 -06:00
user docs/user: Document the %d placeholder and suspend=n QEMU_GDB features 2025-02-10 13:47:59 +00:00
block-replication.txt
bypass-iommu.txt
COLO-FT.txt chardev: finalize 'reconnect' deprecation 2024-10-28 14:37:25 +08:00
colo-proxy.txt
conf.py docs/qapi-domain: add warnings for malformed field lists 2025-03-11 10:10:57 +01:00
defs.rst.inc
glossary.rst docs: add a glossary 2025-01-17 10:45:54 +00:00
igd-assign.txt
image-fuzzer.txt
index.rst docs: add a glossary 2025-01-17 10:45:54 +00:00
memory-hotplug.txt
meson.build 9p: remove 'proxy' filesystem backend driver 2024-10-03 19:33:25 +02:00
multi-thread-compression.txt
multiseat.txt
nvdimm.txt
pci_expander_bridge.txt
pcie.txt
pcie_pci_bridge.txt
pcie_sriov.txt pcie_sriov: Ensure VF addr does not overflow 2025-02-20 18:23:19 -05:00
qcow2-cache.txt
qdev-device-use.txt
qemu-option-trace.rst.inc
qemupciserial.inf
rdma.txt
requirements.txt
spice-port-fqdn.txt
throttle.txt
xbzrle.txt
xen-save-devices-state.txt