diff mbox

[1/3] checkpatch: kconfig: recognize more prompts when checking help texts

Message ID 20180216202255.25307-2-ulfalizer@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ulf Magnusson Feb. 16, 2018, 8:22 p.m. UTC
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 mbox

Patch

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;