From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Markus Heiser <markus.heiser@darmarit.de>
Cc: Jonathan Corbet <corbet@lwn.net>,
Jani Nikula <jani.nikula@intel.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
"linux-doc@vger.kernel.org Mailing List"
<linux-doc@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] doc-rst:c-domain: fix some issues in the c-domain
Date: Thu, 22 Sep 2016 09:08:50 -0300 [thread overview]
Message-ID: <20160922090850.56e3ebb1@vento.lan> (raw)
In-Reply-To: <35B447A7-6C12-4560-8D06-110B8B33CB56@darmarit.de>
Em Tue, 20 Sep 2016 20:56:35 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:
> > If I understood it right, I could do something like:
> >
> > diff --git a/Documentation/media/conf_nitpick.py b/Documentation/media/conf_nitpick.py
> > index 480d548af670..2de603871536 100644
> > --- a/Documentation/media/conf_nitpick.py
> > +++ b/Documentation/media/conf_nitpick.py
> > @@ -107,3 +107,9 @@ nitpick_ignore = [
> >
> > ("c:type", "v4l2_m2m_dev"),
> > ]
> > +
> > +
> > +extensions.append("linuxdoc.rstKernelDoc")
> > +extensions.append("linuxdoc.rstFlatTable")
> > +extensions.append("linuxdoc.kernel_include")
> > +extensions.append("linuxdoc.manKernelDoc")
> >
> > Right?
>
> No ;)
> > It would be good to do some sort of logic on the
> > above for it to automatically include it, if linuxdoc is
> > present, otherwise print a warning and do "just" the normal
> > Sphinx tests.
>
> The intention is; with installing the linuxdoc project you get
> some nice command line tools, like lint for free and if you want
> to see how the linuxdoc project compiles your kernel documentation
> and how e.g. man pages are build or what warnings are spit, you
> have to **replace** the extensions from the kernel's source with
> the one from the linuxdoc project.
>
> This is done by patching the build scripts as described in:
>
> https://return42.github.io/linuxdoc/linux.html
>
> FYI: I updated the documentation of the linuxdoc project.
Hmm... It would be a way better to just do something like the
above patch, specially since a conf_lint.py could have the
modified conf_nitpick.py, and avoiding touching at the
tree. The need of making a patch to use it, touching at the
building system prevents it to be called for every applied
patch that would touch on a documented header file.
I used the above to detect some cut-and-paste issues with some
documentation.
Yet, from what I saw, the parsers of lint still need some work,
as it didn't parse some stuff at the media headers that seem ok.
> In this project I develop and maintain "future" concepts like
> man-page builder and the py-version of the kernel-doc parser.
The new parser seems to have some bugs, like those:
$ kernel-lintdoc include/media/v4l2-ctrls.h
include/media/v4l2-ctrls.h:106 :WARN: typedef of function pointer not marked as typdef, use: 'typedef v4l2_ctrl_notify_fnc' in the comment.
...
include/media/v4l2-ctrls.h:605 :WARN: typedef of function pointer not marked as typdef, use: 'typedef v4l2_ctrl_filter' in the comment.
...
include/media/v4l2-ctrls.h:809 [kernel-doc WARN] : can't understand function proto: 'const char * const *v4l2_ctrl_get_menu(u32 id);'
...
in this case, both typedefs were defined. The prototype for
v4l2_ctrl_get_menu() is also valid.
Anyway, it helped to get some real troubles. Thanks!
> Vice versa, every improvement I see on kernel's source tree is
> merged into this project.
>
> This project is also used by my POC at:
>
> * http://return42.github.io/sphkerneldoc/
>
> E.g. it builds the documentation of the complete kernel sources
>
> * http://return42.github.io/sphkerneldoc/linux_src_doc/index.html
>
> the last one is also my test-case to find regression when I change
> something / running against the whole source tree and compare the
> result to the versioned reST files at
>
> * https://github.com/return42/sphkerneldoc/tree/master/doc/linux_src_doc
>
> -- Markus --
>
> >> E.g. if you want to lint your whole include/media tree type:
> >>
> >> kernel-lintdoc [--sloppy] include/media
> >
> > Yeah, running it manually is another way, although I prefer to have
> > it done via a Makefile target, and doing only for the files that
> > are currently inside a Sphinx rst file (at least on a first moment).
> >
> > Thanks,
> > Mauro
>
Thanks,
Mauro
next prev parent reply other threads:[~2016-09-22 12:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 7:12 [PATCH v2 0/3] doc-rst:c-domain: fix some issues in the c-domain Markus Heiser
2016-09-07 7:12 ` [PATCH v2 1/3] doc-rst:c-domain: fix sphinx version incompatibility Markus Heiser
2016-09-07 7:12 ` [PATCH v2 2/3] doc-rst:c-domain: function-like macros arguments Markus Heiser
2016-09-07 7:12 ` [RFC v2 3/3] doc-rst:c-domain: function-like macros index entry Markus Heiser
2016-09-09 12:08 ` [PATCH v2 0/3] doc-rst:c-domain: fix some issues in the c-domain Mauro Carvalho Chehab
2016-09-09 12:25 ` Markus Heiser
2016-09-19 11:36 ` Markus Heiser
2016-09-19 15:00 ` Mauro Carvalho Chehab
2016-09-20 18:56 ` Markus Heiser
2016-09-20 19:00 ` Jonathan Corbet
2016-09-20 20:58 ` Mauro Carvalho Chehab
2016-09-22 12:08 ` Mauro Carvalho Chehab [this message]
2016-09-22 12:35 ` kernel-lintdoc parser - was: " Mauro Carvalho Chehab
2016-09-22 22:03 ` Markus Heiser
2016-09-22 23:58 ` Markus Heiser
2016-09-16 16:02 ` Jonathan Corbet
2016-09-17 9:45 ` Markus Heiser
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=20160922090850.56e3ebb1@vento.lan \
--to=mchehab@infradead.org \
--cc=corbet@lwn.net \
--cc=jani.nikula@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=markus.heiser@darmarit.de \
/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).