aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-04-27 11:53:45 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-04-28 11:48:34 +0200
commite2e9e567f0e23971cac35ba1dee7edb51085b5f7 (patch)
treec4d85adb035dfb34dee536f839522c6efa37cea6 /docs
parent4622c70689f0bc39bd31922cee2a569f2bc3f390 (diff)
downloadqemu-e2e9e567f0e23971cac35ba1dee7edb51085b5f7.zip
qemu-e2e9e567f0e23971cac35ba1dee7edb51085b5f7.tar.gz
qemu-e2e9e567f0e23971cac35ba1dee7edb51085b5f7.tar.bz2
docs/devel/qapi-code-gen: Describe some doc markup pitfalls
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230427095346.1238913-1-armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/qapi-code-gen.rst53
1 files changed, 53 insertions, 0 deletions
diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index ea05920..af1986f 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -1060,6 +1060,59 @@ For example::
'returns': ['BlockStats'] }
+Markup pitfalls
+~~~~~~~~~~~~~~~
+
+A blank line is required between list items and paragraphs. Without
+it, the list may not be recognized, resulting in garbled output. Good
+example::
+
+ # An event's state is modified if:
+ #
+ # - its name matches the @name pattern, and
+ # - if @vcpu is given, the event has the "vcpu" property.
+
+Without the blank line this would be a single paragraph.
+
+Indentation matters. Bad example::
+
+ # @none: None (no memory side cache in this proximity domain,
+ # or cache associativity unknown)
+
+The description is parsed as a definition list with term "None (no
+memory side cache in this proximity domain," and definition "or cache
+associativity unknown)".
+
+Section tags are case-sensitive and end with a colon. Good example::
+
+ # Since: 7.1
+
+Bad examples (all ordinary paragraphs)::
+
+ # since: 7.1
+
+ # Since 7.1
+
+ # Since : 7.1
+
+Likewise, member descriptions require a colon. Good example::
+
+ # @interface-id: Interface ID
+
+Bad examples (all ordinary paragraphs)::
+
+ # @interface-id Interface ID
+
+ # @interface-id : Interface ID
+
+Undocumented members are not flagged, yet. Instead, the generated
+documentation describes them as "Not documented". Think twice before
+adding more undocumented members.
+
+When you change documentation comments, please check the generated
+documentation comes out as intended!
+
+
Client JSON Protocol introspection
==================================