Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77cc23b8c7f2f5ea0270bf4be31438aa38316e16
Commit:     77cc23b8c7f2f5ea0270bf4be31438aa38316e16
Parent:     792aa2f2cc4924024e28c9ddf1456434992f9c41
Author:     Randy Dunlap <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 7 00:13:42 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 08:42:17 2008 -0800

    kernel-doc: warn on badly formatted short description
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 scripts/kernel-doc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 7df099e..6c18a14 100755
--- a/scripts/kernel-doc
+++ b/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/) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to