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>
This commit is contained in:
Jonathan Corbet 2019-05-24 14:52:01 -06:00
parent 3f715b147a
commit b0d60bfbb6
1 changed files with 9 additions and 7 deletions

View File

@ -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";
}
}
}