diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f2bbea900700..de0f4672cb74 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1382,6 +1382,21 @@ sub process { | |||
1382 | ERROR("trailing whitespace\n" . $herevet); | 1382 | ERROR("trailing whitespace\n" . $herevet); |
1383 | } | 1383 | } |
1384 | 1384 | ||
1385 | # check for Kconfig help text having a real description | ||
1386 | if ($realfile =~ /Kconfig/ && | ||
1387 | $line =~ /\+?\s*(---)?help(---)?$/) { | ||
1388 | my $length = 0; | ||
1389 | for (my $l = $linenr; defined($lines[$l]); $l++) { | ||
1390 | my $f = $lines[$l]; | ||
1391 | $f =~ s/#.*//; | ||
1392 | $f =~ s/^\s+//; | ||
1393 | next if ($f =~ /^$/); | ||
1394 | last if ($f =~ /^\s*config\s/); | ||
1395 | $length++; | ||
1396 | } | ||
1397 | WARN("please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($length < 4); | ||
1398 | } | ||
1399 | |||
1385 | # check we are in a valid source file if not then ignore this hunk | 1400 | # check we are in a valid source file if not then ignore this hunk |
1386 | next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); | 1401 | next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); |
1387 | 1402 | ||