History

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. */

Randy Dunlap committed 18 years ago

Commit 46b958e1 parent 94dc7ad1 file · +5 −0Browse files

Unified · Split

scripts/kernel-doc+5−0
@@ -1950,6 +1950,11 @@ sub process_file($) { · 1949 unmodified lines
19501950 $section = $section_default;
19511951 $contents = "";
19521952 }
1953+ # look for doc_com + <text> + doc_end:
1954+ if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') {
1955+ print STDERR "Warning(${file}:$.): suspicious ending line: $_";
1956+ ++$warnings;
1957+ }
19531958
19541959 $prototype = "";
19551960 $state = 3;