History

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.

Jonathan Corbet committed 7 years ago

Commit b0d60bf1 parent 3f715b11 file · +9 −7Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kernel-doc+9−7
@@ -285,7 +285,7 @@ use constant { · 284 unmodified lines
285 OUTPUT_INTERNAL => 4, # output non-exported symbols285 OUTPUT_INTERNAL => 4, # output non-exported symbols
286};286};
287my $output_selection = OUTPUT_ALL;287my $output_selection = OUTPUT_ALL;
288my $show_not_found = 0;288my $show_not_found = 0; # No longer used
289 289
290my @export_file_list;290my @export_file_list;
291 291
@@ -435,7 +435,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { · 143 unmodified lines
435 } elsif ($cmd eq 'enable-lineno') {435 } elsif ($cmd eq 'enable-lineno') {
436 $enable_lineno = 1;436 $enable_lineno = 1;
437 } elsif ($cmd eq 'show-not-found') {437 } elsif ($cmd eq 'show-not-found') {
438 $show_not_found = 1;438 $show_not_found = 1; # A no-op but don't fail
439 } else {439 } else {
440 # Unknown argument440 # Unknown argument
441 usage();441 usage();
@@ -2163,12 +2163,14 @@ sub process_file($) { · 1721 unmodified lines
2163 }2163 }
2164 2164
2165 # Make sure we got something interesting.2165 # Make sure we got something interesting.
2166 if ($initial_section_counter == $section_counter) {2166 if ($initial_section_counter == $section_counter && $
2167 if ($output_mode ne "none") {2167 output_mode ne "none") {
2168 print STDERR "${file}:1: warning: no structured comments found\n";2168 if ($output_selection == OUTPUT_INCLUDE) {
2169 print STDERR "${file}:1: warning: '$_' not found\n"
2170 for keys %function_table;
2169 }2171 }
2170 if (($output_selection == OUTPUT_INCLUDE) && ($show_not_found == 1)) {2172 else {
2171 print STDERR " Was looking for '$_'.\n" for keys %function_table;2173 print STDERR "${file}:1: warning: no structured comments found\n";
2172 }2174 }
2173 }2175 }
2174}2176}