Skip to content

Commit 91fc6d8

Browse files
committed
docs: kerneldoc.py: append the name of the parsed doc file
Finding where an error like this was generated: ../lib/math/div64.c:73: WARNING: Duplicate C declaration, also defined in 'kernel-api'. Can take some time, as there's no glue about what kernel-doc tag generated it. It is a way better to display it as: .../Documentation/core-api/kernel-api:171: ../lib/math/div64.c:73: WARNING: Duplicate C declaration, also defined in 'kernel-api'. Declaration is 'div_s64_rem'. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 95f4949 commit 91fc6d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Documentation/sphinx/kerneldoc.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ def run(self):
141141
lineoffset = int(match.group(1)) - 1
142142
# we must eat our comments since the upset the markup
143143
else:
144-
result.append(line, filename, lineoffset)
144+
doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)
145+
result.append(line, doc + ": " + filename, lineoffset)
145146
lineoffset += 1
146147

147148
node = nodes.section()

0 commit comments

Comments
 (0)