diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2008-02-07 03:13:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:17 -0500 |
commit | 77cc23b8c7f2f5ea0270bf4be31438aa38316e16 (patch) | |
tree | 9ef9b95916f2f8ffbcc75cc2e079a4e3caac0c50 /scripts/kernel-doc | |
parent | 792aa2f2cc4924024e28c9ddf1456434992f9c41 (diff) |
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 <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 7df099e6d1fd..6c18a14386a4 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -218,6 +218,7 @@ sub usage { | |||
218 | print " [ -function funcname [ -function funcname ...] ]\n"; | 218 | print " [ -function funcname [ -function funcname ...] ]\n"; |
219 | print " [ -nofunction funcname [ -nofunction funcname ...] ]\n"; | 219 | print " [ -nofunction funcname [ -nofunction funcname ...] ]\n"; |
220 | print " c source file(s) > outputfile\n"; | 220 | print " c source file(s) > outputfile\n"; |
221 | print " -v : verbose output, more warnings & other info listed\n"; | ||
221 | exit 1; | 222 | exit 1; |
222 | } | 223 | } |
223 | 224 | ||
@@ -1881,6 +1882,13 @@ sub process_file($) { | |||
1881 | } else { | 1882 | } else { |
1882 | $declaration_purpose = ""; | 1883 | $declaration_purpose = ""; |
1883 | } | 1884 | } |
1885 | |||
1886 | if (($declaration_purpose eq "") && $verbose) { | ||
1887 | print STDERR "Warning(${file}:$.): missing initial short description on line:\n"; | ||
1888 | print STDERR $_; | ||
1889 | ++$warnings; | ||
1890 | } | ||
1891 | |||
1884 | if ($identifier =~ m/^struct/) { | 1892 | if ($identifier =~ m/^struct/) { |
1885 | $decl_type = 'struct'; | 1893 | $decl_type = 'struct'; |
1886 | } elsif ($identifier =~ m/^union/) { | 1894 | } elsif ($identifier =~ m/^union/) { |