lkml.org 
[lkml]   [2021]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation
From
Date
On Mon, 2021-01-04 at 14:09 -0800, Joe Perches wrote:
> On Sun, 2021-01-03 at 08:50 +0100, Nicolai Fischer wrote:
> > Adds a new warning in case the indentation level of the
> > first line of a Kconfig help message is not at least two spaces
> > higher than the keyword itself.
> > Blank lines between the message and the help keyword
> > are ignored.
> >
> > Co-developed-by: Johannes Czekay <johannes.czekay@fau.de>
> > Signed-off-by: Johannes Czekay <johannes.czekay@fau.de>
> > Signed-off-by: Nicolai Fischer <nicolai.fischer@fau.de>
> > ---
> >
> > Now matches indentation of two or more spaces, instead of exactly two.
>
> No, this should match exactly 2 and warn on any other use.

To clarify, only the first line after the help keyword needs to
have a 2 space indent more than the help keyword and the help
block may start with Kconfig keywords.

Subsequent help block lines may have more than 2 chars.

The help block line count should end when the indent is less than
the help keyword indent and is a non-blank line.

This should be valid:

help
line 1
-- reason 1
-- reason 2
continuation
-- reason 3

But this should warn only on line 1:

help
line 1 has a 3 space indent
-- reason 1
-- reason 2
continuation
-- reason 3


\
 
 \ /
  Last update: 2021-01-05 09:58    [W:0.692 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site