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: CLI to display specific command usage help #1314

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

orpheuslummis
Copy link
Contributor

Relevant issue(s)

Resolves #1313

Description

Print the specific command's usage text instead of always printing root command's usage text, on user error.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

manually

@orpheuslummis orpheuslummis added the area/cli Related to the CLI binary label Apr 10, 2023
@orpheuslummis orpheuslummis added this to the DefraDB v0.5 milestone Apr 10, 2023
@orpheuslummis orpheuslummis requested a review from a team April 10, 2023 12:26
@orpheuslummis orpheuslummis self-assigned this Apr 10, 2023
@orpheuslummis orpheuslummis changed the title fix: Display specific command usage help fix: CLI to display specific command usage help on user error Apr 10, 2023
@orpheuslummis orpheuslummis changed the title fix: CLI to display specific command usage help on user error fix: CLI to display specific command usage help Apr 10, 2023
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Merging #1314 (651a130) into develop (01bfd49) will decrease coverage by 0.08%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1314      +/-   ##
===========================================
- Coverage    70.47%   70.39%   -0.08%     
===========================================
  Files          184      184              
  Lines        17823    17823              
===========================================
- Hits         12560    12546      -14     
- Misses        4311     4320       +9     
- Partials       952      957       +5     
Impacted Files Coverage Δ
cli/cli.go 20.93% <50.00%> (ø)

... and 6 files with indirect coverage changes

@source-devs
Copy link

Benchmark Results

Summary

  • 0 Benchmarks successfully compared.
  • 0 Benchmarks were ✅ Better.
  • 0 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
 
❌ See Worse Results...
time/opdelta
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...

@orpheuslummis orpheuslummis added bug Something isn't working action/no-benchmark Skips the action that runs the benchmark. labels Apr 10, 2023
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@orpheuslummis orpheuslummis merged commit 57a30af into develop Apr 10, 2023
@orpheuslummis orpheuslummis deleted the orpheus/fix/cli-specificusage branch April 10, 2023 17:30
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/cli Related to the CLI binary bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI displays root command usage help on every usage command usage error
3 participants