-
Notifications
You must be signed in to change notification settings - Fork 375
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(cmd/gno): initial documentation command for stdlibs and example packages #610
Conversation
PR is now ready for review. I've had to rework a few parts to reduce some unneeded complexity and make sure that we could supply the lacking of Test coverage is around 75%, mostly a few things things missing in print.go but behaviour should be good to go, and the command works also on local directories if you run on a directory inside root-dir. |
…ags verbose and root-dir" This reverts commit 243d24c.
…ev/morgan/gnodev-doc
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.
This was definitely a focused read, so word of warning for anyone going into these code changes
I've probably missed a few things in the parsing code that requires context knowledge. Overall it looks good, and it works great 💯
I've left a few minor comments, otherwise we are good to go 🚀
Would love to see an option for the doc
command where we can export it out into a file, or even attach a special writer for example Markdown / HTML... (sort of like JSDoc generators)
all code review issues replied to and/or addressed :) |
@ajnavarro @thehowl |
…packages (#610) * feat(gnodev): add preliminary doc command, refactor common flags verbose and root-dir * feat(gnodev): initial documentation command for stdlibs packages * chore: remove accidental log line * chore: linter * feat(commands/doc): add support for examples directory * chore: prefer writing to stdout directly instead of using a buffer * fix(doc): improve arg parsing, more tests * tests: add tests for Document * chore: fix typo * update to new dir structure * fmt * Update gnovm/cmd/gno/doc.go Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com> * typo * Revert "feat(gnodev): add preliminary doc command, refactor common flags verbose and root-dir" This reverts commit 243d24c. * change documentable iface * add doc test * address changes requested from code review * fix typo * code review changes * unexport dirs * some typos, some error logging * better and more consistent error handling * use errors.Is for comparison * empty commit to trigger github workflow --------- Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
See #522, #526.
This introduces a
doc
package which is in some ways redundant to that implemented by Yassin in #526. They are meant to eventually be the same package if that PR is merged; but that is to be done perhaps in a future PR.This PR only supports stdlibs packages, and packages from the examples subdirectory in the gno root, for now. With a PR following this one, I would also like to add support for packages and realms using
gno.mod
.Quick asciicast:
(The asciicast for some reason adds
gnodev
before the output of the program - I don't know why this happens, but it's not actually output:)