Yamale
Yamale copied to clipboard
Fail when validation doesn't actually run
When validating a file, if the schema or file doesn't actually exist, it still passes validation and returns an exit code of 0. If validation of an actual file fails then the exit code is 1. This is a similar behavior that would be expected for invalid files or missing files.
If the schema file doesn't exist or the number of matching yaml files is 0, then the exit code should probably be 1.
yamale -s not-a-schema not-a-file
Finding yaml files...
Found 0 yaml files.
Validating...
Validation success! 👍
Agreed, this should be fixed.
I can't give you a timeline right now for when we might get to this. We do accept pull requests if you'd like to submit a fix though :)
Let me work on this. Assign it to me please