]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
docs: kernel_include.py: append line numbers to better report errors
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 22 Aug 2025 14:19:30 +0000 (16:19 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 29 Aug 2025 21:54:43 +0000 (15:54 -0600)
commit4ad9cabc34d1b45ef77fa9c70e446658f6f5934b
tree5d308b59c542298fb4aed9bcd29915f34bbbe4e6
parente4d91787deffffa64abd397315d4f7e4a3cf02f3
docs: kernel_include.py: append line numbers to better report errors

It is best to point to the original line of code that generated
an error than to point to the beginning of a directive.

Add support for it. It should be noticed that this won't work
for literal or code blocks, as Sphinx will ignore it, pointing
to the beginning of the directive. Yet, when the output is known
to be in ReST format, like on TOC, this makes the error a lot
more easier to be handled.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a0953af8b71e64aaf2e0ba4593ad39e19587d50a.1755872208.git.mchehab+huawei@kernel.org
Documentation/sphinx/kernel_include.py