mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
Man page checker: require canonical name in SEE ALSO
The man-page cross-reference script checks the SEE ALSO section to confirm that all references are to existing man pages (#12258). However, it's a little too forgiving: it allows aliases, the short '.so' files under the 'links/' subdirectory. That means we could link to non-default command names, and were doing so. As of this PR, we no longer allow that. Any podman command referenced in SEE ALSO must be the canonical command name (and man page). Fix existing non-canonical names, and remove the exception so we don't allow this again. See #16848 for discussion of context. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -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)**
|
||||
|
@ -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)**
|
||||
|
@ -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>
|
||||
|
@ -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)**
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user