-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add command validate
to check for parse errors
#62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superb work!
You could have added some more validations, which in my opinion, are important ones like,
- Directories listed for mounting on containers are present on host or not.
- Task is present or not when called as
@taskName
in a step of some other task. - Sufficient number of arguments passed when one task is used as step for another task.
@ayushjn20 You're right, We need to look for all kind of other validations. I'll try add the ones you suggested. |
Is there something similar to Joi for Golang? |
I gave a shot at the
Advantage is that messages can be uniform and easy to add more validations. I'll dig up more on if its worth it or probably write a custom validator. |
Validate command
Update:
Above two validations should be added after this change to use @agentmilindu @ayushjn20 Please review. |
Adds a command
validate
to check for parse errors #31 #55Running command
dunner validate
will check for any parse errors and warnings. If there are any errors, it fails the cmd. If not it finishes by listing any warnings if present.Example:
Please let me know if there are any other validations for configs to be included.