Merge pull request #16982 from edsantiago/man_page_see_also_must_be_canonical

[CI:DOCS] Man page checker: require canonical name in SEE ALSO
This commit is contained in:
Daniel J Walsh
2023-01-03 14:02:28 -05:00
committed by GitHub
5 changed files with 12 additions and 6 deletions

View File

@ -73,4 +73,4 @@ podman image mount --format json
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-image(1)](podman-image.1.md)**, **[podman-image-umount(1)](podman-image-umount.1.md)**, **[podman-unshare(1)](podman-unshare.1.md)**, **mount(8)**
**[podman(1)](podman.1.md)**, **[podman-image(1)](podman-image.1.md)**, **[podman-image-unmount(1)](podman-image-unmount.1.md)**, **[podman-unshare(1)](podman-unshare.1.md)**, **mount(8)**

View File

@ -48,4 +48,4 @@ Unmount all images
podman image unmount --all
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-image-mount(1)](podman-image-mount.1.md)**, **[podman-container-mount(1)](podman-container-mount.1.md)**
**[podman(1)](podman.1.md)**, **[podman-image-mount(1)](podman-image-mount.1.md)**, **[podman-mount(1)](podman-mount.1.md)**

View File

@ -98,7 +98,7 @@ AH00558: httpd: Could not reliably determine the server's fully qualified domain
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-run(1)](podman-run.1.md)**, **[podman-container-rm(1)](podman-container-rm.1.md)**
**[podman(1)](podman.1.md)**, **[podman-run(1)](podman-run.1.md)**, **[podman-rm(1)](podman-rm.1.md)**
## HISTORY
February 2018, Updated by Brent Baude <bbaude@redhat.com>

View File

@ -59,4 +59,4 @@ podman unmount --all
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-container-mount(1)](podman-container-mount.1.md)**, **[podman-image-mount(1)](podman-image-mount.1.md)**
**[podman(1)](podman.1.md)**, **[podman-mount(1)](podman-mount.1.md)**, **[podman-image-mount(1)](podman-image-mount.1.md)**

View File

@ -554,7 +554,7 @@ sub _check_seealso_links {
my ($name, $link) = ($1, $2);
if ($name =~ /^(.*)\((\d)\)$/) {
my ($base, $section) = ($1, $2);
if (-e "$Markdown_Path/$base.$section.md" || -e "$Markdown_Path/links/$base.$section") {
if (-e "$Markdown_Path/$base.$section.md") {
if ($link ne "$base.$section.md") {
warn "$ME: $path: inconsistent link $name -> $link, expected $base.$section.md\n";
++$Errs;
@ -578,11 +578,17 @@ sub _check_seealso_links {
my ($base, $section) = ($1, $2);
# Unadorned 'podman-foo(1)' must be a link.
if (-e "$Markdown_Path/$base.$section.md" || -e "$Markdown_Path/links/$base.$section") {
if (-e "$Markdown_Path/$base.$section.md") {
warn "$ME: $path: '$token' should be '[$token]($base.$section.md)'\n";
++$Errs;
}
# Aliases (non-canonical command names): never link to these
if (-e "$Markdown_Path/links/$base.$section") {
warn "$ME: $path: '$token' refers to a command alias; please use the canonical command name instead\n";
++$Errs;
}
# Link to man page foo(5) but without a link. This is not an error
# but Ed may sometimes want to see those on a manual test run.
warn "$ME: $path: plain '$token' would be so much nicer as a link\n"