Yamale
Yamale copied to clipboard
Option to disable recursive file search
I wanted to use Yamale to validate all YAML files in my Github repository.
But Yamale also wants to validate my .github/workflows/CI.yml
file.
Can you introduce a command line option to disable recursive file searches so sub-folders are ignored?
Thanks for the suggestion, I'll think about how this can be done. In the meantime, you can do something like the following:
find *.yaml -exec yamale -s schema.yaml {} \;
Instead of \;
at the end, it should be +
, otherwise the exit code will be 0 (success) instead of 1.
This is useful for calling it as part of build pipelines, as the pipeline will fail if any command returns non-0.
Additionally, the pattern in the find
has to be more restrictive, otherwise you would validate the schema.yaml against itself.