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): More closely match rustc's error style #4602

Merged
merged 2 commits into from Jan 3, 2023

Conversation

epage
Copy link
Member

@epage epage commented Jan 3, 2023

This is a follow up to #4385.

For example, rustc provides this error:

error[E0425]: cannot find value `arg1` in this scope
    --> src/builder/command.rs:4249:23
     |
4249 |                 arg = arg1.help("Print help");
     |                       ^^^^ help: a local variable with a similar name exists: `arg`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `clap` due to previous error

So with both PRs, we went from

error: Found argument '--unknown' which wasn't expected, or isn't valid in this context

  If you tried to supply '--unknown' as a value rather than a flag, use '-- --unknown'

Usage: interop_hand_subcommand[EXE] add [NAME]...

For more information try '--help'

to

error: found argument '--unknown' which wasn't expected, or isn't valid in this context

  note: to pass '--unknown' as a value, use '-- --unknown'

Usage: interop_hand_subcommand[EXE] add [NAME]...

For more information, try '--help'.

@epage epage merged commit 689c77a into clap-rs:master Jan 3, 2023
@epage epage deleted the errors2 branch January 3, 2023 19:42
0x6b added a commit to 0x6b/deepl-api-rs that referenced this pull request Mar 16, 2023
clap-rs/clap#4602 changed the start of the error messages to lower case.
Since the change is trivial, I included this into the same PR.

Ref.: clap-rs/clap#4602
mgruner pushed a commit to mgruner/deepl-api-rs that referenced this pull request Mar 16, 2023
clap-rs/clap#4602 changed the start of the error messages to lower case.
Since the change is trivial, I included this into the same PR.

Ref.: clap-rs/clap#4602
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