strictyaml icon indicating copy to clipboard operation
strictyaml copied to clipboard

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

Open dragetd opened this issue 3 years ago • 3 comments

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.

dragetd avatar Nov 17 '21 20:11 dragetd

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.

crdoconnor avatar Nov 17 '21 21:11 crdoconnor

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.

dragetd avatar Nov 18 '21 06:11 dragetd

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.

crdoconnor avatar Nov 28 '21 18:11 crdoconnor