summaryrefslogtreecommitdiffstats
path: root/util/find-doc-nits
diff options
context:
space:
mode:
authorPaul Yang <yang.yang@baishancloud.com>2018-01-03 01:07:57 +0800
committerMatt Caswell <matt@openssl.org>2018-01-16 17:34:08 +0000
commita085f43fc47cbc38567a0141af1c0718b1885de1 (patch)
treeea751396507514596687a4b8c38640f394c9661b /util/find-doc-nits
parent1f13ad311367c07fe71c9f911195cd25948184d7 (diff)
Enforce return values section check
To avoid check failure, make dummy RETURN VALUES sections in the docs which have no real functions decribed inside... Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4976)
Diffstat (limited to 'util/find-doc-nits')
-rwxr-xr-xutil/find-doc-nits9
1 files changed, 3 insertions, 6 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits
index 7087d366d2..8d580de045 100755
--- a/util/find-doc-nits
+++ b/util/find-doc-nits
@@ -24,7 +24,6 @@ our($opt_h);
our($opt_l);
our($opt_n);
our($opt_p);
-our($opt_s);
our($opt_u);
our($opt_c);
@@ -35,7 +34,6 @@ Find small errors (nits) in documentation. Options:
-d Detailed list of undocumented (implies -u)
-l Print bogus links
-n Print nits in POD pages
- -s Also print missing sections in POD pages (implies -n)
-p Warn if non-public name documented (implies -n)
-u List undocumented functions
-h Print this help message
@@ -217,7 +215,6 @@ sub check()
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;
}
@@ -474,13 +471,13 @@ sub checkflags() {
return $ok;
}
-getopts('cdlnsphu');
+getopts('cdlnphu');
&help() if $opt_h;
-$opt_n = 1 if $opt_s or $opt_p;
+$opt_n = 1 if $opt_p;
$opt_u = 1 if $opt_d;
-die "Need one of -[cdlnspu] flags.\n"
+die "Need one of -[cdlnpu] flags.\n"
unless $opt_c or $opt_l or $opt_n or $opt_u;
if ( $opt_c ) {