qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: michael.roth@amd.com, eblake@redhat.com, kwolf@redhat.com,
	hreitz@redhat.com, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, arei.gonglei@huawei.com,
	pizhenwei@bytedance.com, jsnow@redhat.com,
	vsementsov@yandex-team.ru, eduardo@habkost.net,
	marcel.apfelbaum@gmail.com, wangyanan55@huawei.com,
	quintela@redhat.com, jasowang@redhat.com,
	yuval.shaia.ml@gmail.com, stefanha@redhat.com, kraxel@redhat.com,
	kkostiuk@redhat.com, qemu-block@nongnu.org,
	marcandre.lureau@gmail.com, david@redhat.com
Subject: [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls
Date: Thu, 27 Apr 2023 11:53:45 +0200	[thread overview]
Message-ID: <20230427095346.1238913-1-armbru@redhat.com> (raw)
In-Reply-To: <20230425064223.820979-1-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 docs/devel/qapi-code-gen.rst | 53 ++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index d81aac7a19..14983b074c 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -1059,6 +1059,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
 ==================================
 
-- 
2.39.2



  parent reply	other threads:[~2023-04-27  9:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  6:42 [PATCH v2 00/16] qapi qga/qapi-schema: Doc fixes Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 01/16] qga/qapi-schema: Tidy up documentation of guest-fsfreeze-status Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 02/16] qga/qapi-schema: Fix a misspelled reference Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 03/16] qapi: Fix misspelled references Markus Armbruster
2023-04-25  7:17   ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 04/16] qapi: Fix up references to long gone error classes Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 05/16] qapi/block-core: Clean up after removal of dirty bitmap @status Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 06/16] qapi: @foo should be used to reference, not ``foo`` Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 07/16] qapi: Tidy up examples Markus Armbruster
2023-04-25  7:20   ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 08/16] qapi: Delete largely misleading "Stability Considerations" Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 09/16] qapi: Fix bullet list markup in documentation Markus Armbruster
2023-04-27 15:28   ` Markus Armbruster
2023-04-27 15:44     ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 10/16] qapi: Fix unintended definition lists " Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 11/16] qga/qapi-schema: Fix member documentation markup Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 12/16] qapi: Fix argument " Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 13/16] qapi: Replace ad hoc "since" documentation by member documentation Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 14/16] qapi: Fix misspelled section tags in doc comments Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 15/16] qapi: Format since information the conventional way: (since X.Y) Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 16/16] qapi storage-daemon/qapi: Fix documentation section structure Markus Armbruster
2023-04-27  9:53 ` Markus Armbruster [this message]
2023-04-27 11:09   ` [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls Juan Quintela
2023-04-27 12:36     ` Markus Armbruster
2023-04-27 12:41   ` Vladimir Sementsov-Ogievskiy
2023-04-27 13:47     ` Vladimir Sementsov-Ogievskiy
2023-04-28  9:34     ` Markus Armbruster
2023-04-28  9:44       ` Vladimir Sementsov-Ogievskiy
2023-04-28 10:27         ` Markus Armbruster
2023-04-27  9:53 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230427095346.1238913-1-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=david@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=wangyanan55@huawei.com \
    --cc=yuval.shaia.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).