summaryrefslogtreecommitdiff
path: root/hack/xref-helpmsgs-manpages
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-09-26 06:14:58 -0600
committerEd Santiago <santiago@redhat.com>2022-09-26 06:19:15 -0600
commitfde4d21be5ed3a696f2b6dc777ca153646c69f48 (patch)
tree301906b4f47ab27c752e783b2f02a740d8e369d0 /hack/xref-helpmsgs-manpages
parent1d6147fa13bd65ce2aece8b117e23174581a42e9 (diff)
downloadpodman-fde4d21be5ed3a696f2b6dc777ca153646c69f48.tar.gz
podman-fde4d21be5ed3a696f2b6dc777ca153646c69f48.tar.bz2
podman-fde4d21be5ed3a696f2b6dc777ca153646c69f48.zip
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 <santiago@redhat.com>
Diffstat (limited to 'hack/xref-helpmsgs-manpages')
-rwxr-xr-xhack/xref-helpmsgs-manpages9
1 files changed, 9 insertions, 0 deletions
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';