diff options
author | Rich Salz <rsalz@openssl.org> | 2017-07-02 12:16:38 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-07-03 10:40:33 -0400 |
commit | a95d7574dbcd91c734c1542a423e1cac34dc18b5 (patch) | |
tree | c150ec2a51694895c9c0cc8adfd3544b4757697d /util | |
parent | b43c37658600300de485100185eebec8bfa3dbcf (diff) | |
download | openssl-a95d7574dbcd91c734c1542a423e1cac34dc18b5.tar.gz |
Various doc fixes
Fix a =head1 section name
Fix a typo in POD label
Remove a spurious =back
Add a missing blank line
Avoid 'legacy' -- use 'deprecated' if still needed if we cannot just reword.
Always do strict checking
Do not warn about missing "RETURN VALUES" unless -s is set.
Change OpenSSL version 1.1 -> 1.1.0
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3830)
Diffstat (limited to 'util')
-rwxr-xr-x | util/find-doc-nits | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits index 8f6d482278..bdc1ba225b 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -174,17 +174,14 @@ sub check() print "$id Bad =over $1\n" if $contents =~ /=over([^ ][^24])/; - # Look for multiple consecutive openssl #include lines. - # Consecutive because of files like md5.pod. Sometimes it's okay - # or necessary, as in ssl/SSL_set1_host.pod if ( $contents !~ /=for comment multiple includes/ ) { + # Look for multiple consecutive openssl #include lines + # (non-consecutive lines are okay; see man3/MD5.pod). if ( $contents =~ /=head1 SYNOPSIS(.*)=head1 DESCRIPTION/ms ) { my $count = 0; foreach my $line ( split /\n+/, $1 ) { if ( $line =~ m@include <openssl/@ ) { - if ( ++$count == 2 ) { - print "$id has multiple includes\n"; - } + print "$id has multiple includes\n" if ++$count == 2; } else { $count = 0; } @@ -192,18 +189,6 @@ sub check() } } - return unless $opt_s; - - # Find what section this page is in. If run from "." assume - # section 3. - my $section = 3; - $section = $1 if $dirname =~ /man([1-9])/; - - foreach ((@{$mandatory_sections{'*'}}, @{$mandatory_sections{$section}})) { - print "$id: missing $_ head1 section\n" - if $contents !~ /^=head1\s+${_}\s*$/m; - } - open my $OUT, '>', $temp or die "Can't open $temp, $!"; podchecker($filename, $OUT); @@ -216,6 +201,17 @@ sub check() } close $OUT; unlink $temp || warn "Can't remove $temp, $!"; + + # Find what section this page is in; assume 3. + my $section = 3; + $section = $1 if $dirname =~ /man([1-9])/; + + foreach ((@{$mandatory_sections{'*'}}, @{$mandatory_sections{$section}})) { + # Skip "return values" if not -s + next if $_ eq 'RETURN VALUES' and not $opt_s; + print "$id: missing $_ head1 section\n" + if $contents !~ /^=head1\s+${_}\s*$/m; + } } my %dups; |