提交 46b958eb 编写于 作者: R Randy Dunlap 提交者: Linus Torvalds

kernel-doc: detect trailing kernel-doc line trash

Print a warning when a kernel-doc comment block ends with text on the same
line as the ending comment characters, e.g.:

 * this text is lost. */
Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 94dc7ad5
......@@ -1950,6 +1950,11 @@ sub process_file($) {
$section = $section_default;
$contents = "";
}
# look for doc_com + <text> + doc_end:
if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') {
print STDERR "Warning(${file}:$.): suspicious ending line: $_";
++$warnings;
}
$prototype = "";
$state = 3;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册