Em Wed, 20 Jul 2016 12:38:58 +0200 Markus Heiser <markus.heiser@xxxxxxxxxxx> escreveu: > From: Markus Heiser <markus.heiser@xxxxxxxxxxx> > > Add a reporter replacement that assigns the correct source name and line > number to a system message, as recorded in a ViewList. This seemed to work. It will now pointing the errors inside the kernel-doc stuff: ./drivers/media/dvb-core/dvb_math.h:54: WARNING: Block quote ends without a blank line; unexpected unindent. ./drivers/media/dvb-core/dvb_ringbuffer.h:149: WARNING: Error when parsing function declaration. ./drivers/media/dvb-core/dvb_math.h:55: WARNING: Block quote ends without a blank line; unexpected unindent. ./include/media/media-entity.h:183: WARNING: Explicit markup ends without a blank line; unexpected unindent. ./include/media/v4l2-ctrls.h:533: WARNING: Error when parsing function declaration. I'll do more tests here, and try fix the pointed errors, to be sure about that. Regards, Mauro > > [1] http://mid.gmane.org/CAKMK7uFMQ2wOp99t-8v06Om78mi9OvRZWuQsFJD55QA20BB3iw@xxxxxxxxxxxxxx > > Signed-off-by: Markus Heiser <markus.heiser@xxxxxxxxxxx> > --- > Documentation/sphinx/kernel-doc.py | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/Documentation/sphinx/kernel-doc.py b/Documentation/sphinx/kernel-doc.py > index dedb24e..f6920c0 100644 > --- a/Documentation/sphinx/kernel-doc.py > +++ b/Documentation/sphinx/kernel-doc.py > @@ -37,6 +37,7 @@ from docutils import nodes, statemachine > from docutils.statemachine import ViewList > from docutils.parsers.rst import directives > from sphinx.util.compat import Directive > +from sphinx.ext.autodoc import AutodocReporter > > class KernelDocDirective(Directive): > """Extract kernel-doc comments from the specified file""" > @@ -117,12 +118,17 @@ class KernelDocDirective(Directive): > lineoffset += 1 > > node = nodes.section() > - node.document = self.state.document > - self.state.nested_parse(result, self.content_offset, node) > + buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter > + self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter) > + self.state.memo.title_styles, self.state.memo.section_level = [], 0 > + try: > + self.state.nested_parse(result, 0, node, match_titles=1) > + finally: > + self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf > > return node.children > > - except Exception as e: > + except Exception as e: # pylint: disable=W0703 > env.app.warn('kernel-doc \'%s\' processing failed with: %s' % > (" ".join(cmd), str(e))) > return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))] Thanks, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html