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

Improve cargo insta help output #342

Merged
merged 4 commits into from
Feb 2, 2023

Conversation

not-my-profile
Copy link
Contributor

@not-my-profile not-my-profile commented Feb 1, 2023

If we would bump the MSRV to 1.64.0 we could switch from structopt to clap, which would let us further improve the cargo insta help test output by grouping options with the help_heading option (see astral-sh/ruff#2155 for an example) ... and then we could also have the TestRunner and UnreferencedSnapshots enums derive ValueEnum, which would mean we would no longer have to duplicate the possible_values in cargo-insta.

But seeing that you haven't yet decided on the MSRV issue #289, I just made the improvements that structopt supports :)

`cargo insta help test` previously only reported:

        --unreferenced <unreferenced>     Controls what happens with unreferenced snapshots

This commit changes it to:

        --unreferenced <unreferenced>     Controls what happens with unreferenced snapshots [default: ignore]  [possible
                                          values: ignore, warn, reject, delete, auto]
`cargo insta help test` previously only reported:

        --test-runner <test-runner>       Picks the test runner

This commit changes it to:

        --test-runner <test-runner>       Picks the test runner [default: auto]  [possible values: auto, cargo-test,
                                          nextest]
@mitsuhiko mitsuhiko merged commit 218d2d8 into mitsuhiko:master Feb 2, 2023
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.

2 participants