Skip to content
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] cross-reference .rst files #7291

Merged

Conversation

edsantiago
Copy link
Member

There are a bunch of *.rst files in docs/source, linking sometimes
to man pages and sometimes to other .rst files. These files each
have entries of the following form:
:doc:foo <link-to-foo> Description of foo

...for all podman sub and sub-subcommands 'foo'.

Read all .rst files and make sure that:

  • all entries in a given file are in alphabetical order
  • all link-to-foo targets point to existing doc files
  • every subcommand known by 'podman help' has a corresponding
    doc entry in a .rst file

Signed-off-by: Ed Santiago [email protected]

For each podman*.md file with a subcommand table (podman,
podman-container, etc), assert that the subcommand list
is sorted.

Change is bigger than it should be, because it switches from
nice clean local per-function error counting to using a nasty
global.

Signed-off-by: Ed Santiago <[email protected]>
There are a bunch of *.rst files in docs/source, linking sometimes
to man pages and sometimes to other .rst files. These files each
have entries of the following form:

   :doc:`foo <link-to-foo>` Description of foo

...for all podman sub and sub-subcommands 'foo'.

Read all .rst files and make sure that:

  - all entries in a given file are in alphabetical order
  - all link-to-foo targets point to existing doc files
  - every subcommand known by 'podman help' has a corresponding
    doc entry in a .rst file

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago
Copy link
Member Author

This is a two-commit PR, and I encourage you to review it as such.

The first commit is relatively minor: simply adds a sort-check to one of the man page tests. It's a little more complicated than desired, because I changed error status to a global. It makes sense for....

...The second commit, which is the one that checks .rst files. In this commit I also fixed the problems reported by the new script functionality.

:doc:`prune <markdown/podman-container-prune.1>` Remove all stopped containers

:doc:`restart <markdown/podman-restart.1>` Restart one or more containers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should line 40 and 44 be higher up? 'podman-container-*'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorting on the subcommand name, not the link target. 'prune' < 'restart'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(does that address your concern?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I was liking at the link targets there.

@TomSweeneyRedHat
Copy link
Member

Nice work @edsantiago. I have a love/hate relationship with these kinds of checks. I hate it when I mess up and they ding me, but I love it that they ding me because things are messed up.
The script part LGTM, but I think you'll unlease some ordering errors that will need further help. Will add a LGTM once those are cleaned up.

@mheon
Copy link
Member

mheon commented Aug 11, 2020

LGTM
/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, mheon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2020
@rhatdan
Copy link
Member

rhatdan commented Aug 11, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2020
@openshift-merge-robot openshift-merge-robot merged commit d31a881 into containers:master Aug 11, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants