-
Notifications
You must be signed in to change notification settings - Fork 54
Add -x flag to Validate. #66
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
base: master
Are you sure you want to change the base?
Conversation
When the `-x` flag is supplied, `Validate` will set its exit status to 1 if validation fails, enabling it to be used in a standard Unix pipeline.
If there is not at least a domain supplied, print the usage (as before), and set the exit status to 1. Possibly this should be a distinct value, instead of just 1.
As for Validate, sets exit status non-zero on failure.
|
This merge request is, I think, good to go. Per your suggestion on #20 , I have added a command-line switch to In the process, I discovered that there were failures that would be caught in parsing, but not caught in validation, so I added the This has been very handy for putting VAL into test suites for planning domains, etc. |
|
Thanks Robert for your work here. I have not been ignoring it, but I have been tied up (and will be for at least another couple of weeks). I will leave things in your capable hands and review once I get some time again!
…________________________________
From: rpgoldman ***@***.***>
Sent: 08 April 2025 17:06
To: KCL-Planning/VAL ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [KCL-Planning/VAL] Add -x flag to Validate. (PR #66)
This merge request is, I think, good to go. Per your suggestion on #20<#20> , I have added a command-line switch to Validate, -x, that will set the exit status on failures.
In the process, I discovered that there were failures that would be caught in parsing, but not caught in validation, so I added the -x argument to Parser, as well as Validate.
This has been very handy for putting VAL into test suites for planning domains, etc.
—
Reply to this email directly, view it on GitHub<#66 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB2KOVAG5ZTYGGBJUX565ZD2YPXXPAVCNFSM6AAAAABY4GV35GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBWHE2TEOJSGY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
[https://avatars.githubusercontent.com/u/3274?s=20&v=4]rpgoldman left a comment (KCL-Planning/VAL#66)<#66 (comment)>
This merge request is, I think, good to go. Per your suggestion on #20<#20> , I have added a command-line switch to Validate, -x, that will set the exit status on failures.
In the process, I discovered that there were failures that would be caught in parsing, but not caught in validation, so I added the -x argument to Parser, as well as Validate.
This has been very handy for putting VAL into test suites for planning domains, etc.
—
Reply to this email directly, view it on GitHub<#66 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB2KOVAG5ZTYGGBJUX565ZD2YPXXPAVCNFSM6AAAAABY4GV35GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBWHE2TEOJSGY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
|
@DerekLong101 Sounds good! When you get a chance, it would be good to review this to make sure that I found all the places where Validate and Parser can exit, and made sure to set the exit status appropriately. Possibly I should distinguish between error exit (maybe status 2) and validation failure (1). Finally, I'm not sure I know what the various exits with -1 mean. Anyway, when you get a chance, we can merge this. |
When the
-xflag is supplied,Validatewill set its exit status to 1 if validation fails, enabling it to be used in a standard Unix pipeline.