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

CLI console output behavior for --json and --verbose #313

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

xinaxu
Copy link
Contributor

@xinaxu xinaxu commented Sep 14, 2023

resolves #291

Success? --verbose --json stdout stderr exitcode
simple CLI table none 0
prettified JSON none 0
verbose CLI table none 0
prettified JSON none 0
simple error message none 1
error message wrapped in JSON none 1
simple error message error message stack trace 1
erorr message wrapped in JSON error message stack trace 1

However, due to limitation of urfave/cli, behavior of below cases do not belong to above table

  • required flags not provided - urfave library will print the help page and then print the error message to the console

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage has no change and project coverage change: -3.59% ⚠️

Comparison is base (753cdba) 73.92% compared to head (8a2a373) 70.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #313      +/-   ##
==========================================
- Coverage   73.92%   70.34%   -3.59%     
==========================================
  Files         130      130              
  Lines        8065     8089      +24     
==========================================
- Hits         5962     5690     -272     
- Misses       1474     1802     +328     
+ Partials      629      597      -32     
Files Changed Coverage Δ
cmd/app.go 32.58% <0.00%> (-12.04%) ⬇️
cmd/cliutil/util.go 64.70% <0.00%> (ø)
cmd/deal/send-manual.go 76.47% <ø> (ø)

... and 7 files with indirect coverage changes

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

@xinaxu xinaxu marked this pull request as ready for review September 14, 2023 06:27
@xinaxu xinaxu merged commit 9f957a7 into main Sep 14, 2023
@xinaxu xinaxu deleted the xinaxu/cli-console-output branch September 14, 2023 17:07
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.

[Bug]: deal send-manual - stack trace on rejected deal
1 participant