Skip to content

Commit

Permalink
kernel-doc: detect trailing kernel-doc line trash
Browse files Browse the repository at this point in the history
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: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Apr 28, 2008
1 parent 94dc7ad commit 46b958e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 46b958e

Please sign in to comment.