Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217589
b: refs/heads/master
c: 9fe287d
h: refs/heads/master
i:
  217587: 3c554b4
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 26, 2010
1 parent bf0a70c commit 9097f2c
Show file tree
Hide file tree
Showing 2 changed files with 22 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: 0c73b4eb7a825a5aff16d8a9701f6c28056de058
refs/heads/master: 9fe287d79b0af983050d24e7916cf3d1f019f553
26 changes: 21 additions & 5 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1400,18 +1400,34 @@ sub process {
}

# check for Kconfig help text having a real description
# 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*(?:---)?help(?:---)?$/) {
my $length = 0;
for (my $l = $linenr; defined($lines[$l]); $l++) {
my $f = $lines[$l];
my $cnt = $realcnt;
my $ln = $linenr + 1;
my $f;
my $is_end = 0;
while ($cnt > 0 && defined $lines[$ln - 1]) {
$f = $lines[$ln - 1];
$cnt-- if ($lines[$ln - 1] !~ /^-/);
$is_end = $lines[$ln - 1] =~ /^\+/;
$ln++;

next if ($f =~ /^-/);
$f =~ s/^.//;
$f =~ s/#.*//;
$f =~ s/^\s+//;
next if ($f =~ /^$/);
last if ($f =~ /^\s*config\s/);
if ($f =~ /^\s*config\s/) {
$is_end = 1;
last;
}
$length++;
}
WARN("please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($length < 4);
WARN("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";
}

# check we are in a valid source file if not then ignore this hunk
Expand Down

0 comments on commit 9097f2c

Please sign in to comment.