From: Joshua Lock Date: Tue, 9 Apr 2019 14:10:08 +0000 (+0100) Subject: Add a check for history section location to find-doc-nits X-Git-Tag: openssl-3.0.0-alpha1~2184 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fopenssl.git;a=commitdiff_plain;h=573ac8f2228241771f727ecd8ff10f54073536d3 Add a check for history section location to find-doc-nits Check that the HISTORY section is located after the SEE ALSO section, this is a much more frequent order in OpenSSL manual pages (and UNIX manual pages in general). Also check that SEE ALSO comes after EXAMPLES, so that the tool can ensure the correct manual section sequence. Reviewed-by: Matthias St. Pierre Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/8729) --- diff --git a/util/find-doc-nits b/util/find-doc-nits index 1957eeb7a1..66966eb355 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -171,6 +171,10 @@ sub check() # 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:";