All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Magnusson <ulfalizer@gmail.com>
To: apw@canonical.com, joe@perches.com
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Ulf Magnusson <ulfalizer@gmail.com>
Subject: [PATCH 1/3] checkpatch: kconfig: recognize more prompts when checking help texts
Date: Fri, 16 Feb 2018 21:22:53 +0100	[thread overview]
Message-ID: <20180216202255.25307-2-ulfalizer@gmail.com> (raw)
In-Reply-To: <20180216202255.25307-1-ulfalizer@gmail.com>

The check for a missing or short help text only considers symbols with a
prompt, but doesn't recognize any of the following as a prompt:

	bool 'foo'
	tristate 'foo'
	prompt "foo"
	prompt 'foo'

Make the check recognize those too.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3d4040322ae1..2b404317daea 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2812,7 +2812,7 @@ sub process {
 				next if ($f =~ /^-/);
 				last if (!$file && $f =~ /^\@\@/);
 
-				if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate)\s*\"/) {
+				if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
 					$is_start = 1;
 				} elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) {
 					$length = -1;
-- 
2.14.1

  reply	other threads:[~2018-02-16 20:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 20:22 [PATCH 0/3] Improve and extend checkpatch.pl Kconfig help text checks Ulf Magnusson
2018-02-16 20:22 ` Ulf Magnusson [this message]
2018-02-16 20:22 ` [PATCH 2/3] checkpatch: kconfig: check help texts for menuconfig and choice Ulf Magnusson
2018-03-22 15:13   ` Masahiro Yamada
2018-02-16 20:22 ` [PATCH 3/3] checkpatch: kconfig: prefer 'help' over '---help---' Ulf Magnusson
2018-03-22 15:19   ` Masahiro Yamada
2018-02-16 21:14 ` [PATCH 0/3] Improve and extend checkpatch.pl Kconfig help text checks Joe Perches
2018-02-23  1:30   ` Ulf Magnusson
2018-02-24 13:53     ` Masahiro Yamada
2018-03-06  4:52       ` Ulf Magnusson
2018-03-06  5:13         ` Masahiro Yamada
2018-03-22 15:09           ` Masahiro Yamada

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=20180216202255.25307-2-ulfalizer@gmail.com \
    --to=ulfalizer@gmail.com \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.