yamllint icon indicating copy to clipboard operation
yamllint copied to clipboard

Support ignoring cloud-init #cloud-config directives

Open ferrarimarco opened this issue 3 years ago • 2 comments

Cloud-init requires some configuration files to start with #cloud-config, violating the rules.comments.require-starting-space: true.

This PR adds support for ignoring those directives.

Fixes #416

ferrarimarco avatar Oct 26 '21 11:10 ferrarimarco

Hello, this does not fix #361. Please have a look at the 2 first comments.

adrienverge avatar Oct 26 '21 11:10 adrienverge

Right. Rephrased to point only to #416.

To fix #361, there's more work to do, including ensuring backward compatibility with the shebang case.

ferrarimarco avatar Oct 26 '21 11:10 ferrarimarco

@adrienverge Could you let me know if you decided to merge by reflecting only #416? I'm excited to reflect on this PR.

doyou89 avatar Dec 28 '22 10:12 doyou89

Hello @doyou89, no, as explained in https://github.com/adrienverge/yamllint/issues/416#issuecomment-951981783, specific options for specific software won't likely be embedded in yamllint.

However, an ignore-regex config option would be great because it solves the problem for #cloud-config, as well as for other requests from users (latest example here for #ENC...).

So contributions are welcome! Let's follow this in https://github.com/adrienverge/yamllint/issues/361.

adrienverge avatar Jan 04 '23 17:01 adrienverge