projects/linux·commit 46b958eb

kernel-doc: detect trailing kernel-doc line trash

46b958eb · Randy Dunlap <[email protected]> · 2008-04-28 02:16:35 -07:00

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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
46b958eb808b73a232efc962e730faffe7cff5c5
Parents
94dc7ad5

Changes

1 files changed · +5 −0

FileStatusAddDelContent
scripts/kernel-docmodified+5−0View file

scripts/kernel-doc

View file
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 99364a5..83cee18 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -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;