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

bug: fix using clap macro incorrectly, causing broken long help name #1526

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

ClementTsang
Copy link
Owner

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

Basically, I did:

long = "blah blah blah"

but it should have been:

long,
long_help = "blah blah blah"

The former makes the long help flag the description which... well, isn't right.

Issue

If applicable, what issue does this address?

Closes: #1525

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

Basically, I did:

```
long = "blah blah blah"
```

but it should have been:

```
long,
long_help = "blah blah blah"
```

The former makes the _long help flag_ the description which... well,
isn't right.
@ClementTsang ClementTsang enabled auto-merge (squash) August 1, 2024 15:12
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.23%. Comparing base (9364955) to head (447f933).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1526       +/-   ##
===========================================
- Coverage   53.91%   41.23%   -12.69%     
===========================================
  Files         113      113               
  Lines       17721    17721               
===========================================
- Hits         9555     7307     -2248     
- Misses       8166    10414     +2248     
Flag Coverage Δ
macos-12 36.67% <ø> (ø)
ubuntu-latest 43.21% <ø> (-13.34%) ⬇️
windows-2019 36.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ClementTsang ClementTsang merged commit 03e69b3 into main Aug 1, 2024
36 checks passed
@ClementTsang ClementTsang deleted the fix_incorrect_help_macro branch August 1, 2024 15:21
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.

Help message is distorted
1 participant