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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -285,7 +285,7 @@ use constant { · 284 unmodified lines | ||
| 285 | 285 | OUTPUT_INTERNAL => 4, # output non-exported symbols |
| 286 | 286 | }; |
| 287 | 287 | my $output_selection = OUTPUT_ALL; |
| 288 | −my $show_not_found = 0; | |
| 288 | +my $show_not_found = 0; # No longer used | |
| 289 | 289 | |
| 290 | 290 | my @export_file_list; |
| 291 | 291 | |
| @@ -435,7 +435,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { · 143 unmodified lines | ||
| 435 | 435 | } elsif ($cmd eq 'enable-lineno') { |
| 436 | 436 | $enable_lineno = 1; |
| 437 | 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 | 439 | } else { |
| 440 | 440 | # Unknown argument |
| 441 | 441 | usage(); |
| @@ -2163,12 +2163,14 @@ sub process_file($) { · 1721 unmodified lines | ||
| 2163 | 2163 | } |
| 2164 | 2164 | |
| 2165 | 2165 | # Make sure we got something interesting. |
| 2166 | − if ($initial_section_counter == $section_counter) { | |
| 2167 | − if ($output_mode ne "none") { | |
| 2168 | − print STDERR "${file}:1: warning: no structured comments found\n"; | |
| 2166 | + if ($initial_section_counter == $section_counter && $ | |
| 2167 | + output_mode ne "none") { | |
| 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)) { | |
| 2171 | − print STDERR " Was looking for '$_'.\n" for keys %function_table; | |
| 2172 | + else { | |
| 2173 | + print STDERR "${file}:1: warning: no structured comments found\n"; | |
| 2172 | 2174 | } |
| 2173 | 2175 | } |
| 2174 | 2176 | } |