Skip to contentSkip to conversation

kernel-doc: detect trailing kernel-doc line trash

PATCH New Randy Dunlap 1 participant 1 message Apr 2, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-doc: detect trailing kernel-doc line trash

From: Randy Dunlap <[email protected]>

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

---
 scripts/kernel-doc |    5 +++++
 1 file changed, 5 insertions(+)
scripts/kernel-doc +5 -0
@@ -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;