qemu/docs/devel
Peter Maydell a69a6d4b4d scripts/qapi/parser.py: improve doc comment indent handling
Make the handling of indentation in doc comments more sophisticated,
so that when we see a section like:

Notes: some text
       some more text
          indented line 3

we save it for the doc-comment processing code as:

some text
some more text
   indented line 3

and when we see a section with the heading on its own line:

Notes:

some text
some more text
   indented text

we also accept that and save it in the same form.

If we detect that the comment document text is not indented as much
as we expect it to be, we throw a parse error.  (We don't complain
about over-indented sections, because for rST this can be legitimate
markup.)

The golden reference for the doc comment text is updated to remove
the two 'wrong' indents; these now form a test case that we correctly
stripped leading whitespace from an indented multi-line argument
definition.

We update the documentation in docs/devel/qapi-code-gen.txt to
describe the new indentation rules.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200925162316.21205-6-peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Whitespace between sentences tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-09-29 17:55:39 +02:00
..
atomics.rst qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
bitops.rst docs: Create bitops.rst as example of kernel-docs 2019-12-17 19:36:57 +01:00
blkdebug.txt docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
blkverify.txt meson: link emulators without Makefile.target 2020-08-21 06:30:40 -04:00
build-system.rst docs: update build system documentation 2020-09-08 11:43:16 +02:00
clocks.rst docs/clocks: add device's clock documentation 2020-04-30 15:35:40 +01:00
conf.py docs: Provide separate conf.py for each manual we want 2019-03-07 14:26:46 +00:00
decodetree.rst docs/devel: Document decodetree no-overlap groups 2020-08-04 16:33:47 +01:00
fuzzing.txt docs/fuzz: add instructions for generating a coverage report 2020-07-21 07:29:18 +02:00
index.rst docs: convert build system documentation to rST 2020-08-21 06:30:45 -04:00
kconfig.rst docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
loads-stores.rst accel/tcg: Add endian-specific cpu_{ld, st}* operations 2020-05-11 11:22:06 +01:00
lockcnt.txt qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
memory.rst docs: add memory API reference 2019-12-17 19:36:58 +01:00
migration.rst docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
multi-thread-tcg.rst docs/devel: fix grammar in multi-thread-tcg 2020-07-15 11:52:39 +01:00
multiple-iothreads.txt block: Remove bdrv_set_aio_context() 2019-06-04 16:55:58 +02:00
qapi-code-gen.txt scripts/qapi/parser.py: improve doc comment indent handling 2020-09-29 17:55:39 +02:00
rcu.txt qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
replay.txt replay: document development rules 2019-08-20 17:26:21 +02:00
reset.rst docs/devel/reset.rst: add doc about Resettable interface 2020-01-30 16:02:05 +00:00
s390-dasd-ipl.rst docs: rstfy s390 dasd ipl documentation 2020-02-26 18:57:07 +01:00
secure-coding-practices.rst docs: add Secure Coding Practices to developer docs 2019-05-10 10:53:52 +01:00
stable-process.rst docs/devel: fix stable process doc formatting 2020-01-27 12:13:09 +01:00
tcg-icount.rst docs/devel: add some notes on tcg-icount for developers 2020-07-11 15:53:00 +01:00
tcg-plugins.rst plugins: move the more involved plugins to contrib 2020-09-10 10:47:03 +01:00
tcg.rst docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
testing.rst docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
tracing.txt docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
virtio-migration.txt docs: create config/, devel/ and spin/ subdirectories 2017-06-07 18:22:03 +02:00
writing-qmp-commands.txt monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c 2019-06-17 20:36:56 +02:00