You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The check-yaml hook fails from v2.2.0 onward for scalar values containing a colon without quotes, for the example an URL:
[https://github.com/]
$ pre-commit run check-yaml --verbose --files example.yaml
Check Yaml...............................................................Failed
- hook id: check-yaml
- duration: 0.05s
- exit code: 1
while scanning a plain scalar
in"example.yaml", line 1, column 2
found unexpected ':'in"example.yaml", line 1, column 7
I believe this is a valid value since there's no space after the colon, as mentioned at pycontribs/ruyaml#86.
This issue can't be avoided by using the --unsafe argument, and this errors does not happen when using v2.1.0, when the hook was still using pyYAML instead of ruamel-yaml.
There's a ticket tracking this issue in there, but the solution provided involves using the Python interpreter instead of the C library. https://sourceforge.net/p/ruamel-yaml/tickets/248/
That would indeed solve the issue, but would be slower.
The workaround, besides using v2.1.0, is to wrap the value in quotes or use multi line lists.
The text was updated successfully, but these errors were encountered:
The
check-yaml
hook fails from v2.2.0 onward for scalar values containing a colon without quotes, for the example an URL:[https://github.com/]
I believe this is a valid value since there's no space after the colon, as mentioned at pycontribs/ruyaml#86.
This issue can't be avoided by using the
--unsafe
argument, and this errors does not happen when using v2.1.0, when the hook was still using pyYAML instead of ruamel-yaml.There's a ticket tracking this issue in there, but the solution provided involves using the Python interpreter instead of the C library. https://sourceforge.net/p/ruamel-yaml/tickets/248/
That would indeed solve the issue, but would be slower.
The workaround, besides using v2.1.0, is to wrap the value in quotes or use multi line lists.
The text was updated successfully, but these errors were encountered: