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

neofs-cli: add check commands positional arguments #2525

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

AliceInHunterland
Copy link
Contributor

Added Cobra's check of positional arguments to prevent logically incorrect argument usage and passing redundant arguments to the commands.

Closes #1941.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #2525 (73c81c2) into master (e979a59) will not change coverage.
Report is 7 commits behind head on master.
The diff coverage is n/a.

❗ Current head 73c81c2 differs from pull request most recent head f70e000. Consider uploading reports for the commit f70e000 to get more accurate results

@@           Coverage Diff           @@
##           master    #2525   +/-   ##
=======================================
  Coverage   29.69%   29.69%           
=======================================
  Files         404      404           
  Lines       30711    30711           
=======================================
  Hits         9119     9119           
- Misses      20823    20824    +1     
+ Partials      769      768    -1     
Files Changed Coverage Δ
cmd/neofs-cli/modules/acl/extended/create.go 13.72% <ø> (ø)
cmd/neofs-cli/modules/acl/extended/print.go 31.25% <ø> (ø)

... and 2 files with indirect coverage changes

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

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

It looks much cleaner with Cobra than what we've done with NeoGo.

CHANGELOG.md Outdated Show resolved Hide resolved
cmd/neofs-cli/modules/control/drop_objects.go Outdated Show resolved Hide resolved
cmd/neofs-cli/modules/netmap/nodeinfo.go Outdated Show resolved Hide resolved
Added cobra's check if positional arguments to prevent logically
incorrect argument usage and passing redundant arguments to the commands.

Closes #1941.

Signed-off-by: Ekaterina Pavlova <[email protected]>
@cthulhu-rider cthulhu-rider merged commit f5d80b0 into master Aug 25, 2023
8 checks passed
@cthulhu-rider cthulhu-rider deleted the bugfix/1941-cli-args-check branch August 25, 2023 08:16
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.

Check CLI args for commands that do not need them
4 participants