diff options
author | Jonathan Corbet <corbet@lwn.net> | 2019-05-24 14:52:01 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2019-05-27 16:23:55 -0600 |
commit | b0d60bfbb60cef1efd699a65e29a94487f8c7b1f (patch) | |
tree | 5c52e7b3484a8f1a5be33e6f898cd8b424141e43 /scripts/kernel-doc | |
parent | 3f715b147a6c5245ee25d7334f4053c339feef98 (diff) | |
download | lwn-b0d60bfbb60cef1efd699a65e29a94487f8c7b1f.tar.gz lwn-b0d60bfbb60cef1efd699a65e29a94487f8c7b1f.zip |
kernel-doc: always name missing kerneldoc sections
The "no structured comments found" warning is not particularly useful if
there are several invocations, one of which is looking for something
wrong. So if something specific has been requested, make it clear that
it's the one we weren't able to find.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 3350e498b4ce..c0cb41e65b9b 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -285,7 +285,7 @@ use constant { OUTPUT_INTERNAL => 4, # output non-exported symbols }; my $output_selection = OUTPUT_ALL; -my $show_not_found = 0; +my $show_not_found = 0; # No longer used my @export_file_list; @@ -435,7 +435,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { } elsif ($cmd eq 'enable-lineno') { $enable_lineno = 1; } elsif ($cmd eq 'show-not-found') { - $show_not_found = 1; + $show_not_found = 1; # A no-op but don't fail } else { # Unknown argument usage(); @@ -2163,12 +2163,14 @@ sub process_file($) { } # Make sure we got something interesting. - if ($initial_section_counter == $section_counter) { - if ($output_mode ne "none") { - print STDERR "${file}:1: warning: no structured comments found\n"; + if ($initial_section_counter == $section_counter && $ + output_mode ne "none") { + if ($output_selection == OUTPUT_INCLUDE) { + print STDERR "${file}:1: warning: '$_' not found\n" + for keys %function_table; } - if (($output_selection == OUTPUT_INCLUDE) && ($show_not_found == 1)) { - print STDERR " Was looking for '$_'.\n" for keys %function_table; + else { + print STDERR "${file}:1: warning: no structured comments found\n"; } } } |