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

docs: automatically generate command help documentation #1018

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

phm07
Copy link
Contributor

@phm07 phm07 commented Mar 27, 2025

This PR adds auto-generated documentation for commands like described in #1016

@phm07 phm07 requested a review from a team as a code owner March 27, 2025 11:23
@phm07
Copy link
Contributor Author

phm07 commented Mar 27, 2025

Right now it is not really easy to search through documentation because everything is on the top level. Should we introduce a folder structure?

Copy link

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 47 lines in your changes missing coverage. Please review.

Project coverage is 69.87%. Comparing base (b0d3f23) to head (f122505).

Files with missing lines Patch % Lines
internal/scripts/generate_docs.go 0.00% 47 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1018      +/-   ##
==========================================
- Coverage   70.18%   69.87%   -0.31%     
==========================================
  Files         246      247       +1     
  Lines       10815    10862      +47     
==========================================
  Hits         7590     7590              
- Misses       2547     2594      +47     
  Partials      678      678              
Flag Coverage Δ
e2e 46.88% <ø> (-0.03%) ⬇️
unit 63.38% <0.00%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jooola jooola left a comment

Choose a reason for hiding this comment

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

Before this PR, could you build a small docs structure to guide the readers by the hand with a set of README's, similar to how the fleeting docs is structured:

https://gitlab.com/hetznercloud/fleeting-plugin-hetzner/-/tree/main/docs?ref_type=heads

This is to follow the https://diataxis.fr/ pattern.

phm07 added a commit that referenced this pull request Mar 27, 2025
This PR removes the default value for the `Config` option and moves the
logic into the config parsing itself.
This is so that the user's home path is not shown in help output. This
helps with reproducibility and also allows generating documentation.

In preparation for #1018
@phm07 phm07 force-pushed the auto-generate-docs branch from bd3cd25 to 8b24e97 Compare March 27, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants