From: Markus Armbruster <armbru@redhat.com>
To: dave@treblig.org
Cc: berrange@redhat.com, marcandre.lureau@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2 4/4] hxtool: Error on missing docs
Date: Fri, 16 Jan 2026 09:59:26 +0100 [thread overview]
Message-ID: <875x92rl01.fsf@pond.sub.org> (raw)
In-Reply-To: <20260116005050.376616-5-dave@treblig.org> (dave@treblig.org's message of "Fri, 16 Jan 2026 00:50:48 +0000")
dave@treblig.org writes:
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
>
> Error if a '.name' is seen after another '.name' without an intervening
> SRST, this normally indicates missing or misplaced docs.
>
> We can't check DEF (as used in command line options) because those
> often have multiple DEF per doc.
>
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
> scripts/hxtool | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/scripts/hxtool b/scripts/hxtool
> index 51dc841479..ee98fb9c09 100755
> --- a/scripts/hxtool
> +++ b/scripts/hxtool
> @@ -1,8 +1,14 @@
> #!/bin/sh
>
> +print_if_not_rst()
> +{
> + test $in_rst -eq 0 && printf "%s\n" "$str"
> +}
> hxtoh()
> {
> in_rst=0
> + # .name for HMP
> + seen_name=0
> while read -r str; do
> case $str in
> HXCOMM*)
> @@ -13,6 +19,8 @@ hxtoh()
> echo "Error: SRST inside another RST" >&2
> exit 1
> fi
> + # consume the name
> + seen_name=0
> in_rst=1
> ;;
> ERST*)
> @@ -23,6 +31,16 @@ hxtoh()
> fi
> in_rst=0
> ;;
> + # Note the space at the start - we need to exclude something.name
> + ( .name*)
TIL about the optional left parenthesis here.
> + if [ $seen_name -eq 1 ]
> + then
> + echo "Error: Seen another .name, maybe missing docs?" >&2
> + exit 1
> + fi
> + seen_name=1
> + print_if_not_rst
> + ;;
> *)
> test $in_rst -eq 0 && printf "%s\n" "$str"
> ;;
Reviewed-by: Markus Armbruster <armbru@redhat.com>
prev parent reply other threads:[~2026-01-16 8:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 0:50 [PATCH v2 0/4] HMP: hxtool sanity checks dave
2026-01-16 0:50 ` [PATCH v2 1/4] hmp-commands-info.hx: Move definition of "info accel" dave
2026-01-16 8:13 ` Philippe Mathieu-Daudé
2026-01-16 0:50 ` [PATCH v2 2/4] hmp*hx: Move info docs dave
2026-01-16 8:52 ` Markus Armbruster
2026-01-16 0:50 ` [PATCH v2 3/4] hxtool: Split srst/erst add checks dave
2026-01-16 8:00 ` Thomas Huth
2026-01-16 8:53 ` Markus Armbruster
2026-01-16 0:50 ` [PATCH v2 4/4] hxtool: Error on missing docs dave
2026-01-16 8:02 ` Thomas Huth
2026-01-16 8:59 ` Markus Armbruster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875x92rl01.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.