-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
The ec validate input should take positional arguments instead of named arguments for the list of files to validate, i.e. ec validate input spam.yaml instead of ec validate input --file spam.yaml
Why? Because of all the arguments that command accepts, the input files are likely the thing to have a variable length. Consider the case where you have a bunch of yaml files in a directory. Assuming a shell is being used, positional arguments would look like ec validate input *.yaml, and named parameter like ec validate input $(find . -name '*.yaml' -printf '--file=%p ') . The second version relies on the find utility which may not be available in some contexts.
See cobra's docs on positional arguments.
Acceptance Criteria
- Change
ec validate inputto take positional arguments. Each is treated as a file to be validated. - For backwards compatibility, continue to accept the
--fileparameter, but be sure to mark it as deprecated. If both--fileand positional arguments are provided, combine the values.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels