fix: generate long desc and examples for root command#53
fix: generate long desc and examples for root command#53crazy-max merged 3 commits intodocker:mainfrom
Conversation
|
@crazy-max can you help me look at these test failures? I have tried generating docs with this version in both cli and buildx and I don't see any issues. I can't quite figure out what's going wrong in these tests either. |
ab5ac4f to
adf75cb
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
fc01364 to
9712509
Compare
|
Sorry, I realise my question about I recall now I went looking for flags, and noticing the |
|
@thaJeztah Aaah, I see now yes. Good callout. I just pushed a commit that adds two flags:
I looked at the options implementation in docker/cli and turns out adding I think this change is appropriate since it mimics what we do in the core CLI. 0f4cffc#diff-9059958acfc03b30a2ff8fda8c5bb8403e63b17d7f32cdefe4611817db5cd191R57-R60 |
| Root: dockerCmd, | ||
| SourceDir: tmpdir, | ||
| Plugin: true, | ||
| Plugin: false, |
There was a problem hiding this comment.
Why were these changes needed? (Just curious as I couldn't immediately associate with the change in this PR)
There was a problem hiding this comment.
Root commands for plugins are not generated;
- https://github.com/docker/cli-docs-tool/blob/main/clidocstool_md.go#L50-L54
- https://github.com/docker/cli-docs-tool/blob/main/clidocstool_man.go#L61-L65
- https://github.com/docker/cli-docs-tool/blob/main/clidocstool_yaml.go#L110-L114
|
Let's merge this |
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Adds a hidden --help flag (like in docker/cli) and a dummy -H flag Signed-off-by: David Karlsson <[email protected]>
0f4cffc to
7d56538
Compare
|
I've used this version to generate markdown here:
I've also generated yaml (for docker/cli) here: docker/docs@b9ca733 |
|
Let's get this one in |
We're already calling loadLongDescription recursively, no need to range over the subcommands, otherwise we're skipping the root command.