qapi: Require descriptions and tagged sections to be indented

By convention, we indent the second and subsequent lines of
descriptions and tagged sections, except for examples.

Turn this into a hard rule, and apply it to examples, too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-11-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[Straightforward conflicts in qapi/migration.json resolved]
This commit is contained in:
Markus Armbruster 2024-02-16 15:58:34 +01:00
parent 56c64dd60a
commit d23055b8db
28 changed files with 2289 additions and 2287 deletions

View file

@ -492,6 +492,9 @@ class QAPIDoc:
# indeterminate indentation
if self.text != '':
# non-blank, non-first line determines indentation
if indent == 0:
raise QAPIParseError(
self._parser, "line needs to be indented")
self._indent = indent
elif indent < self._indent:
raise QAPIParseError(