mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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:
parent
56c64dd60a
commit
d23055b8db
28 changed files with 2289 additions and 2287 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue