Skip to content
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

Feature Request: Ability to run yamale on multiple files #250

Open
thiagowfx opened this issue Jun 23, 2024 · 2 comments · May be fixed by #251
Open

Feature Request: Ability to run yamale on multiple files #250

thiagowfx opened this issue Jun 23, 2024 · 2 comments · May be fixed by #251

Comments

@thiagowfx
Copy link
Contributor

thiagowfx commented Jun 23, 2024

Observed: Currently it's only possible to run yamale in a directory, or for a single file.

Expected: It should also be possible to run yamale on a given set of files.

Example usage:

yamale --no-strict -s scripts/argocd_application_schema.yaml apps/base/myapp.yaml apps/base/myapp2.yaml

This currently fails with:

usage: yamale: [...]
yamale: error: unrecognized arguments: apps/base/myapp2.yaml

https://xyproblem.info / Motivation: Somewhat related to #228: It's not currently possible to exclude files from a given directory. In the context of developing Kubernetes GitOps repository this is often an issue. The ability to run yamale on multiple individual files would address it.

@mildebrandt
Copy link

Can you provide the version of Yamale you're using and the error message you're seeing? I can run yamale on single files using the same syntax you gave with the latest release, 5.2.1.

@thiagowfx thiagowfx changed the title Feature Request: Run yamale on a specific file Feature Request: Run yamale on a specific set of files Jun 24, 2024
@thiagowfx
Copy link
Contributor Author

My bad, you are right, Chris. For a single file, it works. The failure happens when you pass more than one file to it.

I got confused because this got surfaced in the context of pre-commit.com, and I had not realized that it was trying to pass more than one file to yamale.

I reworded the FR to support multiple files in addition to an individual one.

The documentation is also outdated ("PATH folder to validate. Default is current directory.").

I will send a PR iff I get spare cycles to do so.

@thiagowfx thiagowfx changed the title Feature Request: Run yamale on a specific set of files Feature Request: Ability to run yamale on multiple files Jun 24, 2024
@thiagowfx thiagowfx linked a pull request Jun 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants