kernel-doc: detect trailing kernel-doc line trash
authorRandy Dunlap <randy.dunlap@oracle.com>
Mon, 28 Apr 2008 09:16:35 +0000 (02:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:48 +0000 (08:58 -0700)
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>
scripts/kernel-doc

index 99364a5e77f25a068c482e5a8a7f99ff3c7a818e..83cee18a02e922130fae1bf9d8dff87d4f6169d8 100755 (executable)
@@ -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;