From fde4d21be5ed3a696f2b6dc777ca153646c69f48 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 26 Sep 2022 06:14:58 -0600 Subject: man page xref: verify page title Issue #15923 should have never happened: the problem should've been autodetected. Make it so henceforth (and fix another existing discrepancy) Signed-off-by: Ed Santiago --- docs/source/markdown/podman-machine-list.1.md | 2 +- hack/xref-helpmsgs-manpages | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/source/markdown/podman-machine-list.1.md b/docs/source/markdown/podman-machine-list.1.md index 351e8cf1b..0c929dcdc 100644 --- a/docs/source/markdown/podman-machine-list.1.md +++ b/docs/source/markdown/podman-machine-list.1.md @@ -1,4 +1,4 @@ -% podman-machine-ls 1 +% podman-machine-list 1 ## NAME podman\-machine\-list - List virtual machines diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages index de9ef8630..fbf2deb22 100755 --- a/hack/xref-helpmsgs-manpages +++ b/hack/xref-helpmsgs-manpages @@ -292,6 +292,15 @@ sub podman_man { chomp $line; next unless $line; # skip empty lines + # First line (page title) must match the command name. + if ($line =~ /^%\s+/) { + my $expect = "% $command 1"; + if ($line ne $expect) { + warn "$ME: $subpath:$.: wrong title line '$line'; should be '$expect'\n"; + ++$Errs; + } + } + # .md files designate sections with leading double hash if ($line =~ /^##\s*(GLOBAL\s+)?OPTIONS/) { $section = 'flags'; -- cgit v1.2.3-54-g00ecf