mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] kernel-doc: warn on badly formatted short description
@ 2008-01-31  0:43 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2008-01-31  0:43 UTC (permalink / raw)
  To: lkml; +Cc: akpm, samr

From: Randy Dunlap <randy.dunlap@oracle.com>

Make kernel-doc warn when a function/struct/union/typedef does not contain
a properly formatted short description, such as:
 * scsi_devinfo: set up the dynamic device list
or
 * scsi_devinfo -

This warning is only generated when verbose (-v) mode is used.

Also explain the -v command line option in the -h output.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/kernel-doc |    8 ++++++++
 1 file changed, 8 insertions(+)

--- linux-2.6.24-git8.orig/scripts/kernel-doc
+++ linux-2.6.24-git8/scripts/kernel-doc
@@ -218,6 +218,7 @@ sub usage {
     print "         [ -function funcname [ -function funcname ...] ]\n";
     print "         [ -nofunction funcname [ -nofunction funcname ...] ]\n";
     print "         c source file(s) > outputfile\n";
+    print "         -v : verbose output, more warnings & other info listed\n";
     exit 1;
 }
 
@@ -1881,6 +1882,13 @@ sub process_file($) {
 		} else {
 		    $declaration_purpose = "";
 		}
+
+		if (($declaration_purpose eq "") && $verbose) {
+			print STDERR "Warning(${file}:$.): missing initial short description on line:\n";
+			print STDERR $_;
+			++$warnings;
+		}
+
 		if ($identifier =~ m/^struct/) {
 		    $decl_type = 'struct';
 		} elsif ($identifier =~ m/^union/) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-31  0:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-31  0:43 [PATCH 2/2] kernel-doc: warn on badly formatted short description Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®