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

Argument "type" validation #19

Open
3 tasks
crookse opened this issue Dec 13, 2021 · 1 comment
Open
3 tasks

Argument "type" validation #19

crookse opened this issue Dec 13, 2021 · 1 comment

Comments

@crookse
Copy link
Member

crookse commented Dec 13, 2021

Summary

What:

Currently, the argument validation only checks to see that the arguments were specified:

  • If an argument is missing, then an error shows up.
  • If an extra argument was passed in, then an error shows up.

We should do argument validation on the "type" of the argument. For example, I want to make 10 test files using rhum like this:

rhum make 10

With the above command, Line should check that 10 is a number.

Why:

It would be nice to have built-in argument type validation.

Acceptance Criteria

Below is a list of tasks that must be completed before this issue can be closed.

  • Write documentation
  • Write unit tests
  • Write integration tests

Example Pseudo Code (for implementation)

Signature property

public signature = "test-creator [test_filename: string] [num_test_cases: number]";

Help Menu

Test Creator - Make test files

USAGE

    test-creator [option]
    test-creator [arg: test_filename] [arg: num_test_cases]

ARGUMENTS

    test_filename <string>
        The test's filename.
    num_test_cases <number>
        The number of test cases to write in the test file.

OPTIONS

    -h, --help
        Show this menu.
    -v, --version
        Show this CLI's version.
@ebebbington
Copy link
Member

would be really cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants