diff options
author | Rich Salz <rsalz@akamai.com> | 2019-09-22 19:49:25 -0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-01 23:42:33 +0200 |
commit | 1738c0ce44e4e2d29a859555caf62415022a3b0e (patch) | |
tree | d6cbca6746ced4c174ef4ceae8a0855e9887e25b /util | |
parent | 776cb8358ebaea254d0537cf57cbafe65ac6f5cf (diff) |
Add '=for comment ifdef' to pod pages
Make find-doc-nits understand that
=for comment ifdef ssl3 ...
in a POD page means that the "-ssl3" flag might be ifdef'd out in the
local environment, and not to complain about it.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9974)
Diffstat (limited to 'util')
-rwxr-xr-x | util/find-doc-nits | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits index 6641a238d8..67a2ee365c 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -538,6 +538,7 @@ sub publicize { } } +# Cipher/digests to skip if not documented my %skips = ( 'aes128' => 1, 'aes192' => 1, @@ -551,8 +552,8 @@ my %skips = ( 'des' => 1, 'des3' => 1, 'idea' => 1, - '[cipher]' => 1, - '[digest]' => 1, + 'cipher' => 1, + 'digest' => 1, ); sub checkflags { @@ -560,6 +561,7 @@ sub checkflags { my $doc = shift; my %cmdopts; my %docopts; + my %localskips; # Get the list of options in the command. open CFH, "./apps/openssl list --options $cmd|" @@ -577,7 +579,15 @@ sub checkflags { while ( <CFH> ) { chop; last if /DESCRIPTION/; + if ( /=for comment ifdef (.*)/ ) { + foreach my $f ( split / /, $1 ) { + $localskips{$f} = 1; + } + next; + } next unless /\[B<-([^ >]+)/; + my $opt = $1; + $opt = $1 if $opt =~ /I<(.*)/; $docopts{$1} = 1; } close CFH; @@ -589,7 +599,7 @@ sub checkflags { } if ( scalar @undocced > 0 ) { foreach ( @undocced ) { - err("doc/man1/$cmd.pod: Missing -$_"); + err("$doc: undocumented option -$_"); } } @@ -600,8 +610,8 @@ sub checkflags { } if ( scalar @unimpl > 0 ) { foreach ( @unimpl ) { - next if defined $skips{$_}; - err("doc/man1/$cmd.pod: Not implemented -$_"); + next if defined $skips{$_} || defined $localskips{$_}; + err("$cmd documented but not implemented -$_"); } } } |