It would be nice if the validator returned a non-zero exit code when used on the cli with the --input option, either optionally behind a cli flag (e.g. --exit-code) or simply by default if --input is used. Perhaps it would even be possible to use different exit codes depending on severity of warnings or errors found (e.g. code 1 for fatal errors, 2 if there were no fatal errors but some warnings, etc.).
My motivation for this is that it'd make it much easier to use the tool in scripts or CI pipelines; currently the easiest way to answer "did validation fail?" i can find is to parse the json output with jq and check the validations (or issues_count) keys directly.
It would be nice if the validator returned a non-zero exit code when used on the cli with the
--inputoption, either optionally behind a cli flag (e.g.--exit-code) or simply by default if--inputis used. Perhaps it would even be possible to use different exit codes depending on severity of warnings or errors found (e.g. code1for fatal errors,2if there were no fatal errors but some warnings, etc.).My motivation for this is that it'd make it much easier to use the tool in scripts or CI pipelines; currently the easiest way to answer "did validation fail?" i can find is to parse the json output with
jqand check thevalidations(orissues_count) keys directly.