crdoconnor / strictyaml

Type-safe YAML parser and validator.
https://hitchdev.com/strictyaml/
MIT License
1.47k stars 60 forks source link

CLI wrapper to validate YAML inside CI and/or via cli #159

Open dragetd opened 2 years ago

dragetd commented 2 years ago

Could we add a wrapper script that can be installed in $PATH that allows us to validate YAML files easily from the CLI?

This would also be nice for CI pipelines to check if added YAML files follow the strictyaml syntax.

crdoconnor commented 2 years ago

Yeah, let me think about it.

I don't think it belongs in this project though. It would need to be a separate project (e.g. "strictyaml-validate").

On Wed, 17 Nov 2021, 22:38 Michael G., @.***> wrote:

Could we add a wrapper script that can be installed in $PATH that allows us to validate YAML files easily from the CLI?

This would also be nice for CI pipelines to check if added YAML files follow the strictyaml syntax.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crdoconnor/strictyaml/issues/159, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJKNJ43X6BBA5ZWJE6ZJ3UMQHCVANCNFSM5IH57S3Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dragetd commented 2 years ago

After creating this issue, I found yamllint.

Also see: https://github.com/adrienverge/yamllint/issues/426

It is a yaml linter which already supports some of the things strictyaml requires. Maybe we can add the missing things as rules and include a 'strict' preset. Argh, too little time, I'd love to have a shot at this some time.

crdoconnor commented 2 years ago

I'm afraid I'm also short on time these days. I'd like for this to exist, though. If you do create a project for this please let me know and I'll promote it at the top of the README.