qapi: Reject section heading in the middle of a doc comment
commit56c64dd60aebb9c856ab63de74c9e81acd079436
authorMarkus Armbruster <armbru@redhat.com>
Fri, 16 Feb 2024 14:58:33 +0000 (16 15:58 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 26 Feb 2024 09:43:56 +0000 (26 10:43 +0100)
treed7b98825495c13fad60afb087a49566c98504ff6
parent31c54b92ad0816ab1c4eddaf4b60c0b17a75dfc9
qapi: Reject section heading in the middle of a doc comment

docs/devel/qapi-code-gen.txt claims "A heading line must be the first
line of the documentation comment block" since commit
55ec69f8b16 (docs/devel/qapi-code-gen.txt: Update to new rST backend
conventions).  Not true, we have code to make it work anywhere in a
free-form doc comment: commit dcdc07a97cb (qapi: Make section headings
start a new doc comment block).

Make it true, for simplicity's sake.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-10-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
scripts/qapi/parser.py
tests/qapi-schema/doc-good.json
tests/qapi-schema/doc-non-first-section.err [new file with mode: 0644]
tests/qapi-schema/doc-non-first-section.json [new file with mode: 0644]
tests/qapi-schema/doc-non-first-section.out [new file with mode: 0644]