summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-08-15 13:52:41 -0400
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-08-19 00:03:33 +0200
commit39a117d17963d0cd4a8f3a3351c0844c325e905c (patch)
tree3875c3ab5ebc8ee35d11b625a1d57a2ce2fab91b /util
parente0249827b3fa81ff6c59fb14ef85d38361dd5e31 (diff)
Fix some pod-page ordering nits
The find-doc-nits script only looked for EXAMPLES, not EXAMPLE. Fix the pattern and then fix the errors that resulted. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/9602)
Diffstat (limited to 'util')
-rwxr-xr-xutil/find-doc-nits24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits
index 499a68fdc4..563a6956a7 100755
--- a/util/find-doc-nits
+++ b/util/find-doc-nits
@@ -151,17 +151,17 @@ sub name_synopsis()
}
}
-# Check if SECTION is located before BEFORE
+# Check if SECTION ($3) is located before BEFORE ($4)
sub check_section_location()
{
- my $filename = shift;
+ my $id = shift;
my $contents = shift;
my $section = shift;
my $before = shift;
- return unless $contents =~ /=head1 $section/
- and $contents =~ /=head1 $before/;
- print "$filename: $section should be placed before $before section\n"
+ return
+ unless $contents =~ /=head1 $section/ and $contents =~ /=head1 $before/;
+ print "$id $section should be placed before $before section\n"
if $contents =~ /=head1 $before.*=head1 $section/ms;
}
@@ -178,15 +178,15 @@ sub check()
close POD;
}
- # Check if EXAMPLES is located after RETURN VALUES section.
- &check_section_location($filename, $contents, "RETURN VALUES", "EXAMPLES") if $filename =~ m|man3/|;
- # Check if HISTORY is located after SEE ALSO
- &check_section_location($filename, $contents, "SEE ALSO", "HISTORY") if $filename =~ m|man3/|;
- # Check if SEE ALSO is located after EXAMPLES
- &check_section_location($filename, $contents, "EXAMPLES", "SEE ALSO") if $filename =~ m|man3/|;
-
my $id = "${filename}:1:";
+ # Check ordering of some sections in man3
+ if ( $filename =~ m|man3/| ) {
+ &check_section_location($id, $contents, "RETURN VALUES", "EXAMPLE");
+ &check_section_location($id, $contents, "SEE ALSO", "HISTORY");
+ &check_section_location($id, $contents, "EXAMPLE", "SEE ALSO");
+ }
+
&name_synopsis($id, $filename, $contents)
unless $contents =~ /=for comment generic/
or $filename =~ m@man[157]/@;