mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	Nicolai Fischer <nicolai.fischer@fau.de>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Cc: apw@canonical.com, johannes.czekay@fau.de, linux-kernel@i4.cs.fau.de
Subject: Re: [RFC PATCH] checkpatch: correctly detect lines of help text
Date: Wed, 02 Dec 2020 11:14:49 -0800	[thread overview]
Message-ID: <fa4e75fa79a89b20f903364acc604cf0796b5421.camel@perches.com> (raw)
In-Reply-To: <16f0bfd4-61ca-48d8-c9ab-10bfc9a233ad@infradead.org>

On Wed, 2020-12-02 at 10:59 -0800, Randy Dunlap wrote:
> On 12/2/20 10:54 AM, Joe Perches wrote:
[]
> > Indentation can vary in the help blocks.  For instance:
> > 
> > arch/Kconfig:   help
> > arch/Kconfig-     Functions will have the stack-protector canary logic added in>
> > arch/Kconfig-     of the following conditions:
> > arch/Kconfig-
> > arch/Kconfig-     - local variable's address used as part of the right hand sid>
> > arch/Kconfig-       assignment or function argument
> > arch/Kconfig-     - local variable is an array (or union containing an array),
> > arch/Kconfig-       regardless of array type or length
> > arch/Kconfig-     - uses register local variables
> > arch/Kconfig-
> > 
> > This doesn't allow blank lines for multi-paragraph help text either.
> > 
> > I think keyword parsing is necessary and some false positives are
> > inevitable as the parsing logic in a line-by-line analyzer will
> > always be incomplete.
> 
> There are also large hunks of block/Kconfig and drivers/hid/Kconfig
> that don't use any indentation for help text...
> in case that matters here.

Maybe a wholesale conversion of Kconfig help text could be done moving
any help block not already as the last entry to be the last entry and
indenting any paragraph help text not already indented 2 extra spaces.

Should be reasonably scriptable given the parser logic available in
scripts/kconfig/.

Something akin to the scripts/parse-maintainers.pl script.


  reply	other threads:[~2020-12-02 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 18:27 Nicolai Fischer
2020-12-02 18:54 ` Joe Perches
2020-12-02 18:59   ` Randy Dunlap
2020-12-02 19:14     ` Joe Perches [this message]
2020-12-03 17:58     ` Joe Perches
2020-12-03 18:31       ` Randy Dunlap
2020-12-03 19:04         ` Joe Perches
2020-12-03 19:07           ` Randy Dunlap

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=fa4e75fa79a89b20f903364acc604cf0796b5421.camel@perches.com \
    --to=joe@perches.com \
    --cc=ak@linux.intel.com \
    --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 \
    --cc=rdunlap@infradead.org \
    /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®