qapi: Recognize section tags and 'Features:' only after blank line

Putting a blank line before section tags and 'Features:' is good,
existing practice.  Enforce it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-12-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Markus Armbruster 2024-02-16 15:58:35 +01:00
parent d23055b8db
commit 66227e9047
9 changed files with 32 additions and 12 deletions

View file

@ -1 +1 @@
doc-duplicated-return.json:7:1: duplicated 'Returns' section
doc-duplicated-return.json:8:1: duplicated 'Returns' section

View file

@ -4,5 +4,6 @@
# @foo:
#
# Returns: 0
#
# Returns: 1
##

View file

@ -1 +1 @@
doc-duplicated-since.json:7:1: duplicated 'Since' section
doc-duplicated-since.json:8:1: duplicated 'Since' section

View file

@ -4,5 +4,6 @@
# @foo:
#
# Since: 0
#
# Since: 1
##

View file

@ -154,22 +154,29 @@
# Features:
# @cmd-feat1: a feature
# @cmd-feat2: another feature
#
# Note: @arg3 is undocumented
#
# Returns: @Object
#
# TODO: frobnicate
#
# Notes:
#
# - Lorem ipsum dolor sit amet
# - Ut enim ad minim veniam
#
# Duis aute irure dolor
#
# Example:
#
# -> in
# <- out
#
# Examples:
# - *verbatim*
# - {braces}
#
# Since: 2.10
##
{ 'command': 'cmd',
@ -180,9 +187,11 @@
##
# @cmd-boxed:
# If you're bored enough to read this, go see a video of boxed cats
#
# Features:
# @cmd-feat1: a feature
# @cmd-feat2: another feature
#
# Example:
#
# -> in

View file

@ -1 +1 @@
doc-invalid-return.json:5: 'Returns:' is only valid for commands
doc-invalid-return.json:6: 'Returns:' is only valid for commands

View file

@ -2,6 +2,7 @@
##
# @FOO:
#
# Returns: blah
##
{ 'event': 'FOO' }