Exit code of failed validations should be non-zero
Brought to you by:
kwatch
If the command line tool fails to validate a yaml file, then — in good Unix tradition — the exit code should be non-zero. So the kwalify tool could be easily be used in shell scripts and makefiles. Currently the exit code is always zero.
This is what I currently observe:
$ kwalify -f schema.yaml failing_data_file.yaml ; echo $?
_etc/hosts-kwalify.yaml#0: INVALID
...
0
Note that the equivalent perl utility (pkwalify in the CPAN module Kwalify.pm) does it right.