-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"string value is redundantly quoted with single quotes" when string is a timestamp #665
Comments
Hello and thanks for the report!
It depends whether your YAML file is YAML 1.1 or YAML 1.2. With version 1.2, sexagesimal numbers (base 60) like Since yamllint tries to support the newer YAML version (1.2), its current behavior seems appropriate. However, there is an ongoing effort to make yamllint adaptative depending on the detected YAML version. See for example #587 and #650. To conclude, I see 2 solutions:
|
I have a
dependabot.yml
file withThe quotes around the
time
value are really needed, as dependabot expects a string here. Dropping the quotes gives an errorThe property '#/updates/0/schedule/time' of type integer did not match the following type: string
.It seems that, without the quote, the field value is parsed as a base-60 integer: https://yaml.org/type/int.html. In theory, dependabot could accept integers as time values, but currently it only accepts string values.
yamllint suggests "string value is redundantly quoted with single quotes", which isn't correct: without the quotes, it would not be a string value.
The text was updated successfully, but these errors were encountered: