summary refs log tree commit diff stats
path: root/docs/sphinx/qapidoc.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2024-02-16 15:58:31 +0100
committerMarkus Armbruster <armbru@redhat.com>2024-02-26 10:43:56 +0100
commit573e2223f91a1662dad3c4ab5f6724bbe2633eff (patch)
treef0b5120853594459b4874852ffb4cdea92100f21 /docs/sphinx/qapidoc.py
parentbf00dc19f3aacf014b308d57bb0debf250339396 (diff)
downloadfocaccia-qemu-573e2223f91a1662dad3c4ab5f6724bbe2633eff.tar.gz
focaccia-qemu-573e2223f91a1662dad3c4ab5f6724bbe2633eff.zip
qapi: Improve error message for empty doc sections
Improve the message for an empty tagged section from

    empty doc section 'Note'

to

    text required after 'Note:'

and the message for an empty argument or feature description from

    empty doc section 'foo'

to

    text required after '@foo:'

Improve the error position to refer to the beginning of the empty
section instead of its end.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-8-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'docs/sphinx/qapidoc.py')
-rw-r--r--docs/sphinx/qapidoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index 488de23d72..1e8b4a70a1 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -239,8 +239,8 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
         seen_item = False
         dlnode = nodes.definition_list()
         for section in doc.features.values():
-            dlnode += self._make_dlitem([nodes.literal('', section.name)],
-                                        section.text)
+            dlnode += self._make_dlitem(
+                [nodes.literal('', section.member.name)], section.text)
             seen_item = True
 
         if not seen_item: