Re: [PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation

From: Joe Perches
Date: Tue Jan 05 2021 - 03:58:09 EST


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@xxxxxx>
> > Signed-off-by: Johannes Czekay <johannes.czekay@xxxxxx>
> > Signed-off-by: Nicolai Fischer <nicolai.fischer@xxxxxx>
> > ---
> >
> > 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