From: Peter Maydell <peter.maydell@linaro.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: qemu-devel@nongnu.org, David Woodhouse <dwmw@amazon.co.uk>,
Paul Durrant <paul@xen.org>
Subject: Re: [PATCH v4] doc/sphinx/hxtool.py: add optional label argument to SRST directive
Date: Thu, 1 Feb 2024 13:53:11 +0000 [thread overview]
Message-ID: <CAFEAcA8GVPjeyc2dxvmh0NtB-bp0yzXH25fpnWrjxzMEjzOLBQ@mail.gmail.com> (raw)
In-Reply-To: <20240130190348.682912-1-dwmw2@infradead.org>
On Tue, 30 Jan 2024 at 19:04, David Woodhouse <dwmw2@infradead.org> wrote:
>
> From: David Woodhouse <dwmw@amazon.co.uk>
>
> We can't just embed labels directly into files like qemu-options.hx which
> are included from multiple top-level rST files, because Sphinx sees the
> labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707
>
> So add an optional argument to the SRST directive which causes a label
> of the form '.. _DOCNAME-HXFILE-LABEL:' to be emitted, where 'DOCNAME'
> is the name of the top level rST file, 'HXFILE' is the filename of the
> .hx file, and 'LABEL' is the text provided within the 'SRST()' directive.
> Using the DOCNAME of the top-level rST document means that it is unique
> even when the .hx file is included from two different documents, as is
> the case for qemu-options.hx
>
> Now where the Xen PV documentation refers to the documentation for the
> -initrd command line option, it can emit a link directly to it as
> '<system/invocation-qemu-options-initrd>'.
>
> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> Reviewed-by: Paul Durrant <paul@xen.org>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> v4:
> • Wrap long lines to shut checkpatch up
Applied to target-arm.next, thanks.
PS: for checkpatch long lines, note that our coding style doc
permits line lengths which checkpatch will warn about, if
it would be "obviously less readable" than wrapping. So
that particular warning is more of a "look at this and see
if it could be written in a different way" rather than a
"definitely change this to get rid of the warning" one.
(At some point I might try to go back and get the discrepancy
between what our coding style doc says checkpatch complains
about and what it actually complains about straightened out.
The underlying issue is that there's no consensus between
whether it's better that:
* checkpatch produces a warning on code that's in a "grey
area" where we might be OK with it but it might be better
to change it, so that the patch submitter is prompted to
look at that part of the change and consider altering it
* checkpatch doesn't warn about "grey area" situations,
so that we don't have "checkpatch complains but we're
actually happy with the patch and wouldn't want it changed"
situations
)
-- PMM
prev parent reply other threads:[~2024-02-01 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 19:01 [PATCH v4] doc/sphinx/hxtool.py: add optional label argument to SRST directive David Woodhouse
2024-02-01 13:53 ` Peter Maydell [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=CAFEAcA8GVPjeyc2dxvmh0NtB-bp0yzXH25fpnWrjxzMEjzOLBQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=dwmw2@infradead.org \
--cc=dwmw@amazon.co.uk \
--cc=paul@xen.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).