Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46b958eb authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds
Browse files

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

Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 94dc7ad5
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1950,6 +1950,11 @@ sub process_file($) {
		    $section = $section_default;
		    $section = $section_default;
		    $contents = "";
		    $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 = "";
		$prototype = "";
		$state = 3;
		$state = 3;