浏览代码

checkpatch: widen implied comment detection to allow multiple stars

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>
Andy Whitcroft 16 年之前
父节点
当前提交
83242e0c23
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/checkpatch.pl

+ 1 - 1
scripts/checkpatch.pl

@@ -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;
 			}