verso
verso copied to clipboard
Feature requests
Thank you for this tool! It is a great idea and very elegantly executed: I love how minimal and clean the design is; it's really a joy to use, and my code is really improving as a result. Moreover, with this design, I imagine that it will be easy to extend to cover different use-cases.
Just jotting down here a couple of things I felt would be nice, so that I don't forget them (none are really necessary; the tool is fine without them):
-
It may be nice for the error messages, like
Error: (src/lib.rs:1212:7) DoubleOpen found a fragment open symbol while a fragment is already opened: 1212
and
Error: (src/lib.rs:1767:3) CloseBeforeOpen found a fragment close symbol when no fragment is active: 1767
to mention the names (found
foo
open whilebar
was already opened, or found close forfoo
…). But the line numbers are enough for now. -
This won't be wanted in most cases, but to make sure I've covered everything, it may be nice for
verso
to show all the lines that are not covered by any fragment (or put them in automatically generatedeverything_else
fragment(s) — this will mostly be blank lines and a few comments), and similarly forrecto
to report all the fragments that were defined but weren't referenced.Edit: And just to echo my point about how good the design is: I am already able to achieve the latter with
for i in $(verso src/lib.rs src/bin.rs | jq -r '.[].id'); do grep -q @@$i docs-src/about.md || echo "$i"; done
Thanks for the kind words! I'm happy you're finding verso
useful, and these are very reasonable suggestions.
I'm not actively working on this project at the moment so it may be a bit before I get around to implementing either of these. If you want to take a stab at it I'd be happy to review a patch as well.