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

fix(error): Be consistent with rustc diagnostic guidelines #4385

Merged
merged 2 commits into from Jan 3, 2023

Conversation

epage
Copy link
Member

@epage epage commented Oct 13, 2022

From
https://rustc-dev-guide.rust-lang.org/diagnostics.html#suggestion-style-guide

Suggestions should not be a question. In particular, language like
"did you mean" should be avoided. Sometimes, it's unclear why a
particular suggestion is being made. In these cases, it's better to be
upfront about what the suggestion is.

The message may contain further instruction such as "to do xyz, use"
or "to do xyz, use abc".

Inspired by #2766

From
https://rustc-dev-guide.rust-lang.org/diagnostics.html#suggestion-style-guide

> Suggestions should not be a question. In particular, language like
> "did you mean" should be avoided. Sometimes, it's unclear why a
> particular suggestion is being made. In these cases, it's better to be
> upfront about what the suggestion is.
>
> The message may contain further instruction such as "to do xyz, use"
> or "to do xyz, use abc".

Inspired by clap-rs#2766
@epage
Copy link
Member Author

epage commented Oct 13, 2022

It could probably use some more work and I'm hesitant in doing a change like this in a patch release as people might design some of their own CLI to match clap and changing it could provide a degraded experience, so we might want to call attention to this by saving it for a minor release.

@epage epage marked this pull request as ready for review January 3, 2023 18:54
@epage epage merged commit e7d58b3 into clap-rs:master Jan 3, 2023
@epage epage deleted the errors branch January 3, 2023 18:54
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.

None yet

1 participant