diff options
author | Rich Salz <rsalz@akamai.com> | 2019-10-04 17:09:19 -0400 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2019-10-31 14:26:34 +0100 |
commit | 6e4618a0d7e84e70703d546a194df887fd624727 (patch) | |
tree | 5f1297d73c92eb486c5570dbf7fa9297765ec440 /util | |
parent | 9fcb9702fba8aa135945f96aefddf050a6f4f11d (diff) | |
download | openssl-6e4618a0d7e84e70703d546a194df887fd624727.zip openssl-6e4618a0d7e84e70703d546a194df887fd624727.tar.gz openssl-6e4618a0d7e84e70703d546a194df887fd624727.tar.bz2 |
Fix L<> entries without sections
Add sections (almost always "(3)" to L<> references that were missing
them. Among other things, this
Fixes: #10226
Also remove two references to non-existant manpages that have never
existed, and with the 3.0 structure, are unlikely to do so.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10240)
Diffstat (limited to 'util')
-rwxr-xr-x | util/find-doc-nits | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits index 12d832b..f07929f 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -447,6 +447,24 @@ sub check { check_section_location($id, $contents, "EXAMPLES", "SEE ALSO"); } + # Make sure every link has a section. + while ( $contents =~ /$markup_re/msg ) { + my $target = $1; + next unless $target =~ /^L</; # Skip if not L<...>, or + next if $target =~ /::/; # links to a Perl module, or + next if $target =~ m@L</@; # links within the page, or + next if $target =~ /^L<https?:/; # is a URL link, or + next if $target =~ m@\([1357]\)>$@; # it has a section, or + next if $target =~ m@\([1357]\)/.*>$@; # it has a section/anchor + err($id, "Section missing in $target") + } + # Check for proper in-man-3 API links. + while ( $contents =~ /L<([^>]*)\(3\)(?:\/.*)?>/g ) { + my $target = $1; + err($id, "Bad L<$target>") + unless $target =~ /^[_[:alpha:]][_[:alnum:]]*$/ + } + unless ( $contents =~ /=for openssl generic/ ) { if ( $filename =~ m|man3/| ) { name_synopsis($id, $filename, $contents); |