notation icon indicating copy to clipboard operation
notation copied to clipboard

fix: add number of arguments validation

Open priteshbandi opened this issue 2 years ago • 2 comments

fix: add number of arguments validation


This PR is continuation of https://github.com/notaryproject/notation/pull/649

https://github.com/notaryproject/notation/pull/649#discussion_r1184665327 @JeyJeyGao I did try using positional and Custom Arguments but the error messages were not user friendly. Also, we needed to rewrite bunch of unit tests to support this.

./notation verify someImage -m "adasd=1" sadad=2
Error: accepts 1 arg(s), received 2

priteshbandi avatar May 13 '23 00:05 priteshbandi

Codecov Report

Merging #664 (80aec7a) into main (d850c3f) will decrease coverage by 0.22%. The diff coverage is 81.25%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
- Coverage   36.12%   35.90%   -0.22%     
==========================================
  Files          32       34       +2     
  Lines        1982     2008      +26     
==========================================
+ Hits          716      721       +5     
- Misses       1238     1258      +20     
- Partials       28       29       +1     
Impacted Files Coverage Δ
cmd/notation/internal/cmdutil/args.go 62.50% <62.50%> (ø)
cmd/notation/inspect.go 16.74% <100.00%> (ø)
cmd/notation/list.go 28.75% <100.00%> (ø)
cmd/notation/sign.go 45.38% <100.00%> (ø)
cmd/notation/verify.go 34.84% <100.00%> (ø)

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar May 13 '23 02:05 codecov-commenter

This PR is stale because it has been opened for 45 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days.

github-actions[bot] avatar Mar 23 '24 01:03 github-actions[bot]

PR closed due to no activity in the past 30 days.

github-actions[bot] avatar Apr 23 '24 01:04 github-actions[bot]