-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI:DOCS] Maintain consistent order of short and long flag names in docs #8318
[CI:DOCS] Maintain consistent order of short and long flag names in docs #8318
Conversation
@edsantiago PTAL and check the regex. |
86292f9
to
710817a
Compare
LGTM |
Something is broken, because you missed one in |
Friendly suggestion: diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages
index 557b22446..c5447c5d6 100755
--- a/hack/xref-helpmsgs-manpages
+++ b/hack/xref-helpmsgs-manpages
@@ -331,8 +331,15 @@ sub podman_man {
@most_recent_flags = ();
# As of PR #8292, all options are <h4> and anchored
if ($line =~ s/^\#{4}\s+//) {
- # Handle any variation of '**--foo**=*bar*, **-f**'
- while ($line =~ s/^\*\*((--[a-z0-9-]+)|(-[a-zA-Z0-9]))\*\*((=\*[a-zA-Z0-9-]+\*)?,\s+)?//g) {
+ # If option has long and short form, long must come first.
+ # This is a while-loop because there may be multiple long
+ # option names, e.g. --net/--network
+ while ($line =~ s/^\*\*(--[a-z0-9-]+)\*\*(=\*[a-zA-Z0-9-]+\*)?(,\s+)?//g) {
+ $man{$1} = 1;
+ push @most_recent_flags, $1;
+ }
+ # Short form
+ if ($line =~ s/^\*\*(-[a-zA-Z0-9])\*\*(=\*[a-zA-Z0-9-]+\*)?//g) {
$man{$1} = 1;
# Keep track of them, in case we see 'Not implemented' below It's ugly, but it's the best I can do on short notice. You will need to fix |
Make the order of short and long flag names in the documentation consistent. Also adjust the man page validaten script to only allow the `**--long**, **-s**` syntax. Signed-off-by: Paul Holzinger <[email protected]>
710817a
to
f5a2e57
Compare
@@ -394,7 +394,7 @@ The format of `LIMIT` is `<number>[<unit>]`. Unit can be `b` (bytes), | |||
`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a | |||
unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap. | |||
|
|||
#### **--net**, **--network**=*string* | |||
#### **--network**=*mode* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman build doesn't support the --net alias I opend #8322
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a bug, but I am fine with fixing the man pages for now.
Thanks @edsantiago. It should be working now. |
LGTM but I'd like an extra set of eyes on the newly-changed portions of |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Make the order of short and long flag names in the documentation
consistent. Also adjust the man page validaten script to only allow the
**--long**, **-s**
syntax.Signed-off-by: Paul Holzinger [email protected]