Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283074
b: refs/heads/master
c: a138580
h: refs/heads/master
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Jan 11, 2012
1 parent d8518a3 commit e56c0e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e469cdc08ac5d84b220f8fb76a090d158d5114f
refs/heads/master: a13858033a3a993147d190317cc9d709f0a1b819
17 changes: 12 additions & 5 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1674,19 +1674,26 @@ sub process {
# Only applies when adding the entry originally, after that we do not have
# sufficient context to determine whether it is indeed long enough.
if ($realfile =~ /Kconfig/ &&
$line =~ /\+\s*(?:---)?help(?:---)?$/) {
$line =~ /.\s*config\s+/) {
my $length = 0;
my $cnt = $realcnt;
my $ln = $linenr + 1;
my $f;
my $is_start = 0;
my $is_end = 0;
while ($cnt > 0 && defined $lines[$ln - 1]) {
for (; $cnt > 0 && defined $lines[$ln - 1]; $ln++) {
$f = $lines[$ln - 1];
$cnt-- if ($lines[$ln - 1] !~ /^-/);
$is_end = $lines[$ln - 1] =~ /^\+/;
$ln++;

next if ($f =~ /^-/);

if ($lines[$ln - 1] =~ /.\s*(?:bool|tristate)\s*\"/) {
$is_start = 1;
} elsif ($lines[$ln - 1] =~ /.\s*(?:---)?help(?:---)?$/) {
$length = -1;
}

$f =~ s/^.//;
$f =~ s/#.*//;
$f =~ s/^\s+//;
Expand All @@ -1698,8 +1705,8 @@ sub process {
$length++;
}
WARN("CONFIG_DESCRIPTION",
"please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_end && $length < 4);
#print "is_end<$is_end> length<$length>\n";
"please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_start && $is_end && $length < 4);
#print "is_start<$is_start> is_end<$is_end> length<$length>\n";
}

if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
Expand Down

0 comments on commit e56c0e5

Please sign in to comment.