-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: generate manual page automatically with cobra/doc #2352
Conversation
@ittner this pull request has failed checks 🛠 |
It would be nice to see the example output in the pr description. I will rerun the CI later, to get the coverage result. Tests are passing, except for coverage which we see later. The cmd package usually has coverage problems due to missing tests in the area, if the coverage is red only cplee (owner) can ignore the failure |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2352 +/- ##
===========================================
+ Coverage 61.56% 76.64% +15.07%
===========================================
Files 53 62 +9
Lines 9002 8177 -825
===========================================
+ Hits 5542 6267 +725
+ Misses 3020 1345 -1675
- Partials 440 565 +125 ☔ View full report in Codecov by Sentry. |
Hmm, transcript from the man cli. I could not figure out how to display the man page using your cli flag without seeing man page source code or storing it inside a file
...I'm still undecided about this feature |
Hi @ChristopherHX ! A bit of rationale for this feature: I'm looking into packaging act for Debian and Ubuntu and manpages are required by both distro policies. I can imagine other distros having similar requirements. Of course, manpages can be written manually (at the risk of leaving them outdated as the CLI changes) or I can keep a local patch use it to generate the pages when needed, but this code seems more useful if it is shared among potential users. Hugo and others uses a similar approach for generating man-pages, for example. I though about having it optionally write the output to a file but I fear this can introduce more complexity that needed for potential users, as they will need to remember or look into another options instead of just redirecting with the shell... but perhaps my fear is undeserved and the output to a file is welcome. |
@ittner this pull request is now in conflict 😩 |
Add a command line switch "--man-page" to print an automatically generated manual page to stdout.
a5c199d
to
9ad5c19
Compare
Branch rebased to fix new conflict on go.sum/mod. |
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.
Thank your for outlining you intention here, we could technically hide the flag from help as this is more a packaging extension than a feature for people using act
I'm not blocking your plan to make it an official debian/ubuntu package, but be aware I already had the situation that tools like podman/buildah lacked bug fixes for thing fixed over 6 months ago
So a ppa is actually more important for people like me, I have scripts to host it with GitHub Pages
The auto merge of dependable bot updates is unfortunate for any PR that changes dependencies, especially if they would be open for an extended amount of time
@@ -81,6 +82,7 @@ require ( | |||
github.com/pmezard/go-difflib v1.0.0 // indirect | |||
github.com/rivo/uniseg v0.4.7 // indirect | |||
github.com/robfig/cron/v3 v3.0.1 // indirect | |||
github.com/russross/blackfriday/v2 v2.1.0 // indirect |
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.
Note for reviewer: New dependency, last updated 4 years ago
Add a command line switch "--man-page" to print an automatically generated manual page to stdout. Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Add a command line switch "--man-page" to print an automatically generated manual page to stdout. Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Add a command line switch "--man-page" to print an automatically generated manual page to stdout.