diff options
| author | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-06-07 13:34:40 +0200 |
|---|---|---|
| committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-06-07 13:34:40 +0200 |
| commit | 78a34380586d5e91977042a43afe5affef64444a (patch) | |
| tree | 2952647413d29d2cd28cfb8b73387b8b5b44a2fd /scripts/kernel-doc | |
| parent | efaa74744c62e3a040ee1a352228e97581c35565 (diff) | |
docbook: Warn about missing parameter definitions
Previously kernel-doc silently ignored missing parameter descriptions
but sometimes 'make sgmldocs' failed with exit code > 0.
When kernel-doc encounter parameters where the description is missing
it now prints a warning.
docproc corrected so previously exit code are recorded.
docbook makefile cleaned up a bit
Diffstat (limited to 'scripts/kernel-doc')
| -rwxr-xr-x | scripts/kernel-doc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index b586ca4cacea..3c02ef90abc8 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -154,6 +154,7 @@ use strict; # '%CONST' - name of a constant. my $errors = 0; +my $warnings = 0; # match expressions used to find embedded type information my $type_constant = '\%([-_\w]+)'; @@ -1352,7 +1353,9 @@ sub create_parameterlist($$$) { "or member '$param' not " . "described in '$declaration_name'\n"; } - ++$errors; + print STDERR "Warning(${file}:$.):". + " No description found for parameter '$param'\n"; + ++$warnings; } push @parameterlist, $param; @@ -1456,6 +1459,12 @@ foreach (@ARGV) { chomp; process_file($_); } +if ($verbose && $errors) { + print STDERR "$errors errors\n"; +} +if ($verbose && $warnings) { + print STDERR "$warnings warnings\n"; +} exit($errors); @@ -1580,7 +1589,7 @@ sub process_file($) { } else { print STDERR "Warning(${file}:$.): Cannot understand $_ on line $.", " - I thought it was a doc line\n"; - ++$errors; + ++$warnings; $state = 0; } } elsif ($state == 2) { # look for head: lines, and include content @@ -1633,7 +1642,7 @@ sub process_file($) { } else { # i dont know - bad line? ignore. print STDERR "Warning(${file}:$.): bad line: $_"; - ++$errors; + ++$warnings; } } elsif ($state == 3) { # scanning for function { (end of prototype) if ($decl_type eq 'function') { |
