From: Julia Evans Date: Fri, 02 Oct 2026 18:20:47 GMT Subject: Re: [PATCH] doc: don't require a SYNOPSIS in section 7 Message-ID: <01891b4b-ce04-41aa-8065-d7b88e466dbc@app.fastmail.com> In-Reply-To: > +# assume the first line is formatted like 'gitglossary(7)' > +my $firstline = <>; > +$firstline =~ m/\((\d)\)/; > +my $man_section_number = $1; > + > my $last_was_section; > my @actual_order; > while (my $line = <>) { > @@ -93,6 +98,8 @@ while (my $line = <>) { > > for my $section (sort keys %SECTIONS) { > next if !$SECTIONS{$section}->{required} or exists > $actual_sections{$section}; > + # Synopsis is not required in section 7 > + next if ($section eq "SYNOPSIS" && $man_section_number eq "7"); > report("has no required '$section' section!"); > } I just realized that this script is actually supposed to be able to process multiple files as command line arguments, and that this patch won't work for that. I don't understand how Perl's `<>` works when you pass multiple files as command line arguments and that might be too much of a can of worms for me to figure right now :/