checkpatch: kconfig: recognize more prompts when checking help texts
authorUlf Magnusson <ulfalizer@gmail.com>
Fri, 16 Feb 2018 20:22:53 +0000 (21:22 +0100)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 25 Mar 2018 17:03:56 +0000 (02:03 +0900)
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>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/checkpatch.pl

index 3d4040322ae19f66662f4a836db44ab096c46db3..2b404317daea43356cfa9556eb57c236ee48ca71 100755 (executable)
@@ -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;