lkml.org 
[lkml]   [2018]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] checkpatch.pl: Improve WARNING on Kconfig help
From
Date
On Wed, 2018-12-19 at 11:59 +0000, Andy Whitcroft wrote:
> On Wed, Dec 19, 2018 at 02:44:36AM -0800, Joe Perches wrote:
> > On Wed, 2018-12-19 at 10:35 +0200, Igor Stoppa wrote:
> > > The checkpatch.pl script complains when the help section of a Kconfig
> > > entry is too short, but it doesn't really explain what it is looking
> > > for. Instead, it gives a generic warning that one should consider writing
> > > a paragraph.
> > >
> > > But what it *really* checks is that the help section is at least
> > > .$min_conf_desc_length lines long.
> > >
> > > Since the definition of what is a paragraph is not really carved in
> > > stone (and actually the primary descriptions is "5 sentences"), make the
> > > warning less ambiguous by expliciting the actual test condition, so that
> > > one doesn't have to read checkpatch.pl sources, to figure out the actual
> > > test.
> > []
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > []
> > > @@ -2931,7 +2931,8 @@ sub process {
> > > }
> > > if ($is_start && $is_end && $length < $min_conf_desc_length) {
> > > WARN("CONFIG_DESCRIPTION",
> > > - "please write a paragraph that describes the config symbol fully\n" . $herecurr);
> > > + "please write a paragraph (" .$min_conf_desc_length . " lines)" .
> >
> > could say "(at least $min_conf_desc_length lines)"
>
> The original is better description in the semantic sense. We want them
> to describe it well. We assume they haven't because it is short. We
> don't want them to make it long, we want them to confirm it is fully
> described.
>
> You arn't trying to make people make these warnings away, they should
> just be checking they have met the criteria in the warning. If they
> have they can ignore the warning and be happy, they don't have to add
> two more lines.
>
> To cover both cases perhaps:
>
> "please ensure that this config symbols is described fully (less than
> $min_conf_desc_length lines is quite brief)"

This is one of those checkpatch bleats I never
really thought was appropriate as some or many
Kconfig symbols are fully descriptive in even
with only a single line.

Also, it seems you are arguing for a checkpatch
--verbose-help output style rather than the
intentionally terse single line output that the
script produces today.

That is something Al Viro once suggested in this thread:
https://lore.kernel.org/patchwork/patch/775901/

On Sat, 2017-04-01 at 05:08 +0100, Al Viro wrote:
> On Fri, Mar 31, 2017 at 08:52:50PM -0700, Joe Perches wrote:
> > checkpatch messages are single line.
>
> Too bad... Incidentally, being able to get more detailed explanation of
> a warning might be a serious improvement, especially if it contains
> the rationale. Hell, something like TeX handling of errors might be
> a good idea - warning printed, offered actions include 'give more help',
> 'continue', 'exit', 'from now on suppress this kind of warning', 'from
> now on just dump this kind of warning into log and keep going', 'from
> now on dump all warnings into log and keep going'.


\
 
 \ /
  Last update: 2018-12-19 13:31    [W:0.513 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site