Merge pull request #15935 from edsantiago/xref_manpage_title

[CI:DOCS] man page xref: verify page title
This commit is contained in:
OpenShift Merge Robot 2022-09-26 15:42:47 +02:00 committed by GitHub
commit cad59a12b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
% podman-machine-ls 1
% podman-machine-list 1
## NAME
podman\-machine\-list - List virtual machines

View File

@ -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';