Skip to content

Commit

Permalink
checkpatch: widen implied comment detection to allow multiple stars
Browse files Browse the repository at this point in the history
Some people use double star '**' as a comment continuation, and start
comments with complete lines of stars.  Widen the implied comment
detection to pick these up.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Jan 6, 2009
1 parent 721c1cb commit 83242e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ sub process {
# is the start of a diff block and this line starts
# ' *' then it is very likely a comment.
if (!defined $edge &&
$rawlines[$linenr] =~ m@^.\s* \*(?:\s|$)@)
$rawlines[$linenr] =~ m@^.\s*(?:\*\*+| \*)(?:\s|$)@)
{
$in_comment = 1;
}
Expand Down

0 comments on commit 83242e0

Please sign in to comment.