summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2018-10-17 10:25:00 -0400
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-10-15 16:04:46 +0200
commit3fb4bdabc2cb23eeff8309b5abdc61bbedbc6bea (patch)
tree4d406c762a97445cec29479de2ca4bcc26072481 /util
parentac8881e160632a8de6ca123a9f85b2e6f8ae173b (diff)
Ignore duplicated undocumented things
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Yang <yang.yang@baishancloud.com> (cherry picked from commit ee4afacd96f5bfbe7662c8f0ec4464c6eee4c450) Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10094)
Diffstat (limited to 'util')
-rwxr-xr-xutil/find-doc-nits10
1 files changed, 7 insertions, 3 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits
index 699887a267..f2fd85ce8e 100755
--- a/util/find-doc-nits
+++ b/util/find-doc-nits
@@ -35,7 +35,7 @@ Find small errors (nits) in documentation. Options:
-l Print bogus links
-n Print nits in POD pages
-p Warn if non-public name documented (implies -n)
- -u List undocumented functions
+ -u Count undocumented functions
-h Print this help message
-c List undocumented commands and options
EOF
@@ -294,6 +294,7 @@ my %docced;
sub checkmacros()
{
my $count = 0;
+ my %seen;
print "# Checking macros (approximate)\n";
foreach my $f ( glob('include/openssl/*.h') ) {
@@ -305,7 +306,7 @@ sub checkmacros()
while ( <IN> ) {
next unless /^#\s*define\s*(\S+)\(/;
my $macro = $1;
- next if $docced{$macro};
+ next if $docced{$macro} || defined $seen{$macro};
next if $macro =~ /i2d_/
|| $macro =~ /d2i_/
|| $macro =~ /DEPRECATEDIN/
@@ -313,6 +314,7 @@ sub checkmacros()
|| $macro =~ /DECLARE_/;
print "$f:$macro\n" if $opt_d;
$count++;
+ $seen{$macro} = 1;
}
close(IN);
}
@@ -324,15 +326,17 @@ sub printem()
my $libname = shift;
my $numfile = shift;
my $count = 0;
+ my %seen;
foreach my $func ( &parsenum($numfile) ) {
- next if $docced{$func};
+ next if $docced{$func} || defined $seen{$func};
# Skip ASN1 utilities
next if $func =~ /^ASN1_/;
print "$libname:$func\n" if $opt_d;
$count++;
+ $seen{$func} = 1;
}
print "# Found $count missing from $numfile\n\n";
}