[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87czvit65m.fsf@meer.lwn.net>
Date: Mon, 29 Mar 2021 07:56:37 -0600
From: Jonathan Corbet <corbet@....net>
To: Aditya Srivastava <yashsri421@...il.com>
Cc: yashsri421@...il.com, lukas.bulwahn@...il.com,
linux-kernel-mentees@...ts.linuxfoundation.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: kernel-doc: add warning for comment not
following kernel-doc syntax
Aditya Srivastava <yashsri421@...il.com> writes:
> Currently, kernel-doc start parsing the comment as a kernel-doc comment if
> it starts with '/**', but does not take into account if the content inside
> the comment too, adheres with the expected format.
> This results in unexpected and unclear warnings for the user.
>
> E.g., running scripts/kernel-doc -none mm/memcontrol.c emits:
> "mm/memcontrol.c:961: warning: expecting prototype for do not fallback to current(). Prototype was for get_mem_cgroup_from_current() instead"
>
> Here kernel-doc parses the corresponding comment as a kernel-doc comment
> and expects prototype for it in the next lines, and as a result causing
> this warning.
>
> Provide a clearer warning message to the users regarding the same, if the
> content inside the comment does not follow the kernel-doc expected format.
>
> Signed-off-by: Aditya Srivastava <yashsri421@...il.com>
> ---
> scripts/kernel-doc | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
This is definitely a capability we want, but I really don't think that
we can turn it on by default - for now. Experience shows that if you
create a blizzard of warnings, nobody sees any of them. How many
warnings does this add to a full docs build?
For now I think we need a flag to turn this warning on, which perhaps
can be set for a W=1 build.
Thanks,
jon
Powered by blists - more mailing lists