Commit b0d60bfb authored by Jonathan Corbet's avatar Jonathan Corbet

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: default avatarJonathan Corbet <corbet@lwn.net>
parent 3f715b14
...@@ -285,7 +285,7 @@ use constant { ...@@ -285,7 +285,7 @@ use constant {
OUTPUT_INTERNAL => 4, # output non-exported symbols OUTPUT_INTERNAL => 4, # output non-exported symbols
}; };
my $output_selection = OUTPUT_ALL; my $output_selection = OUTPUT_ALL;
my $show_not_found = 0; my $show_not_found = 0; # No longer used
my @export_file_list; my @export_file_list;
...@@ -435,7 +435,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { ...@@ -435,7 +435,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) {
} elsif ($cmd eq 'enable-lineno') { } elsif ($cmd eq 'enable-lineno') {
$enable_lineno = 1; $enable_lineno = 1;
} elsif ($cmd eq 'show-not-found') { } elsif ($cmd eq 'show-not-found') {
$show_not_found = 1; $show_not_found = 1; # A no-op but don't fail
} else { } else {
# Unknown argument # Unknown argument
usage(); usage();
...@@ -2163,12 +2163,14 @@ sub process_file($) { ...@@ -2163,12 +2163,14 @@ sub process_file($) {
} }
# Make sure we got something interesting. # Make sure we got something interesting.
if ($initial_section_counter == $section_counter) { if ($initial_section_counter == $section_counter && $
if ($output_mode ne "none") { output_mode ne "none") {
print STDERR "${file}:1: warning: no structured comments found\n"; 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)) { else {
print STDERR " Was looking for '$_'.\n" for keys %function_table; print STDERR "${file}:1: warning: no structured comments found\n";
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment