You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: smarter parsing of doc comments #134
breaking-changeThis change is breaking and, if implemented, must be postponed until the next minor releaseenhancementWe would love to have this feature! Feel free to supply a PR
#[structopt(short="n", long="no-op")]/// Run the command as normal, but don't modify the file////// In no-op mode, rewrite will do everything it normally does, including/// writing to a temporary file, if enabled. The only thing it doesn't do is/// modify the contents of the file.
no_op:bool,
It would be nice if structopt detected the line break, and set the separate parts as help and long_help. It would also be nice if it automatically reflows the line breaks correctly.
Reacted by Dror Levin, konsti, Stephen M. Coakley, rnd, Jonas Schievink and Felipe S. S. Schneider
Would it be possible to come up a new feature flag (e.g. split_doc_comment, upcoming_enhancement) to introduce such a new feature earlier as an explicit opt-in?
That's not a problem of doing a breaking change, we just release a 0.3 and that's it. It will force me to do the other breaking changes that I want (I think of #18).
Structopt already merge lines, thus, clap should reflow. If not, that a problem with clap.
Maybe somthing completly differnt but as it fits the smarter doc comment parsing section. Is there any option forcing structopt to keep the formatting of the doc comment to achieve the same behaviour as using a raw string for long_help or long_about?
This could be nice as it would allow to introduce proper formatted doc comments including lists and source blocks into the long descriptions.
breaking-changeThis change is breaking and, if implemented, must be postponed until the next minor releaseenhancementWe would love to have this feature! Feel free to supply a PR
Activity
TeXitoi commentedon Aug 26, 2018
Good idea, but it will be a breaking change.
Structopt already merge lines, thus, clap should reflow. If not, that a problem with clap.
0ndorio commentedon Oct 11, 2018
Would it be possible to come up a new feature flag (e.g.
split_doc_comment,upcoming_enhancement) to introduce such a new feature earlier as an explicit opt-in?TeXitoi commentedon Oct 11, 2018
That's not a problem of doing a breaking change, we just release a 0.3 and that's it. It will force me to do the other breaking changes that I want (I think of #18).
0ndorio commentedon Oct 12, 2018
Maybe somthing completly differnt but as it fits the
smarter doc comment parsingsection. Is there any option forcing structopt to keep the formatting of the doc comment to achieve the same behaviour as using a raw string forlong_helporlong_about?This could be nice as it would allow to introduce proper formatted doc comments including lists and source blocks into the long descriptions.
ebkalderon commentedon Feb 12, 2019
Since #146 was already merged and published, shouldn't this issue be closed?
TeXitoi commentedon Feb 12, 2019
@ebkalderon good point
@0ndorio if you still want #134 (comment) please create a dedicated issue.
Lucretiel commentedon Feb 12, 2019
Thanks!