mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nicolai Fischer <nicolai.fischer@fau.de>, linux-kernel@vger.kernel.org
Cc: apw@canonical.com, akpm@linux-foundation.org,
	johannes.czekay@fau.de, linux-kernel@i4.cs.fau.de
Subject: Re: [PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation
Date: Tue, 05 Jan 2021 00:57:09 -0800	[thread overview]
Message-ID: <5f01770454d163605406265b1bf316e0452753cf.camel@perches.com> (raw)
In-Reply-To: <0e8754d14cb5624704159ba85b18f8a6bb703b27.camel@perches.com>

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



  reply	other threads:[~2021-01-05  8:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 10:22 [PATCH 0/2] checkpatch: update kconfig parsing Nicolai Fischer
2020-12-26 14:05 ` [PATCH v2 0/4] " Nicolai Fischer
2020-12-26 14:05   ` [PATCH v2 1/4] checkpatch: kconfig: replace '---help---' with 'help' Nicolai Fischer
2020-12-26 14:05   ` [PATCH v2 2/4] checkpatch: kconfig: add missing types to regex Nicolai Fischer
2020-12-26 14:05   ` [PATCH v2 3/4] checkpatch: kconfig: enforce help text indentation Nicolai Fischer
2020-12-26 15:50     ` Joe Perches
2020-12-26 14:05   ` [PATCH v2 4/4] checkpatch: kconfig: clarify warning for paragraph length Nicolai Fischer
2021-01-03  7:50   ` [PATCH v3 0/5] update kconfig parsing Nicolai Fischer
2021-01-03  7:50     ` [PATCH v3 1/5] checkpatch: kconfig: replace '---help---' with 'help' Nicolai Fischer
2021-01-03  7:50     ` [PATCH v3 2/5] checkpatch: kconfig: add missing types to regex Nicolai Fischer
2021-01-03  7:50     ` [PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation Nicolai Fischer
2021-01-04 22:09       ` Joe Perches
2021-01-05  8:57         ` Joe Perches [this message]
2021-01-05 15:49           ` Nicolai Fischer
2021-01-03  7:50     ` [PATCH v3 4/5] checkpatch: kconfig: clarify warning for paragraph length Nicolai Fischer
2021-01-03  7:50     ` [PATCH v3 5/5] checkpatch: kconfig: enforce block indentation Nicolai Fischer

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=5f01770454d163605406265b1bf316e0452753cf.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=johannes.czekay@fau.de \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolai.fischer@fau.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

all inboxes | Powered by JetHome®