diff options
author | Rich Salz <rsalz@akamai.com> | 2019-09-25 15:20:11 -0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-01 08:36:58 +0200 |
commit | e8769719c9bbe53d7af088111b7625671660d4db (patch) | |
tree | 222b64baed23d8f70f19928e58486851e5b7fc95 /util | |
parent | 4dcb150ea30f9bbfa7946e6b39c30a86aca5ed02 (diff) |
Consistent formatting of flags with args
For documentation of all commands with "-flag arg" format them
consistently: "B<-flag> I<arg>", except when arg is literal
(for example "B<-inform> B<PEM>|B<DER>")
Update find-doc-nits to complain if badly formatted strings are found.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10022)
Diffstat (limited to 'util')
-rwxr-xr-x | util/find-doc-nits | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits index 11dcfcbac3..6641a238d8 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -255,6 +255,20 @@ sub check { if $contents =~ /=over([^ ][^24])/; err($id, "Possible version style issue") if $contents =~ /OpenSSL version [019]/; + err($id, "Brackets on item line") + if $contents =~ /=item \[/; + if ( $contents !~ /=for comment generic/) { + # Some API pages have B<foo<I<TYPE>bar>. + err($id, "Bad flag formatting inside B<>") + if $contents =~ /B<-[A-Za-z_ ]+ /; + while ( $contents =~ /([BI])<([^>]*)>/g ) { + my $B = $1; + my $T = $2; + next if $T =~ /E</; # Assume it's E<lt> + err($id, "Bad content inside $B<$T>") + if $T =~ /[<|]/; + } + } if ( $contents !~ /=for comment multiple includes/ ) { # Look for multiple consecutive openssl #include lines |