-
Notifications
You must be signed in to change notification settings - Fork 308
Open
Description
This is similar to #663, but not quite the same.
Consider:
$ cat cont.yaml
a: "b\
c"Comparing yamllint 1.35 to 1.37, I see an improvement, since quotes are allowed now:
$ yamllint --version && yamllint -d 'rules: {quoted-strings: {required: only-when-needed, quote-type: double}}' cont.yaml
yamllint 1.35.1
./cont.yaml
1:4 error string value is redundantly quoted with double quotes (quoted-strings)
$ pip install yamllint==1.37.1
$ yamllint --version && yamllint -d 'rules: {quoted-strings: {required: only-when-needed, quote-type: double}}' cont.yaml
yamllint 1.37.1However, if I change to using quote-type: single, yamllint complains that I’m using double quotes instead of single quotes:
$ yamllint --version && yamllint -d 'rules: {quoted-strings: {required: only-when-needed, quote-type: single}}' cont.yaml
yamllint 1.37.1
cont.yaml
1:4 error string value is not quoted with single quotes (quoted-strings)(To the best of my knowledge, backslash-as-continuation-char only works with double quotes, not single quotes. The sample cont.yaml would typically be used for much longer strings, of course.)
Thanks for considering!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels