[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/11] include/exec: fix kerneldoc definition
From: |
Peter Maydell |
Subject: |
Re: [PATCH 10/11] include/exec: fix kerneldoc definition |
Date: |
Mon, 13 Mar 2023 18:08:19 +0000 |
On Mon, 13 Mar 2023 at 17:30, Peter Maydell <peter.maydell@linaro.org> wrote:
> So I think the problem here is not with Sphinx, but with the
> kernel-doc script. That script has an option "-Werror" which
> turns its warnings into errors, but our Sphinx extension
> docs/sphinx/kerneldoc.py does not set it. I think we need to
> have the extension say "if Sphinx was run with -W then
> pass this flag along" (hopefully Sphinx lets us find out...)
This works:
--- a/docs/sphinx/kerneldoc.py
+++ b/docs/sphinx/kerneldoc.py
@@ -74,6 +74,10 @@ def run(self):
# Sphinx versions
cmd += ['-sphinx-version', sphinx.__version__]
+ # Pass through the warnings-as-errors flag if appropriate
+ if env.app.warningiserror:
+ cmd += ['-Werror']
+
filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
export_file_patterns = []
but I think it's prodding undocumented Sphinx internals, so
I'm going to check whether there's a better way to do this.
It might be more robust to have meson create a commandline
with a -Dkerneldoc_werror option that we then pick up in
the extension code, rather than trying to find out whether
-W was passed.
-- PMM
- Re: [PATCH 07/11] tcg: Clear plugin_mem_cbs on TB exit, (continued)
[PATCH 06/11] include/qemu: add documentation for memory callbacks, Alex Bennée, 2023/03/10
[PATCH 05/11] gitlab: update centos-8-stream job, Alex Bennée, 2023/03/10
[PATCH 08/11] tests/tcg: add some help output for running individual tests, Alex Bennée, 2023/03/10