-
Notifications
You must be signed in to change notification settings - Fork 280
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 contains line break and backslash #663
Comments
I realized after opening this that it should theoretically be possible to use
Trying to match the newline with single or double quoted |
Hello Thomas and thanks for the report. This indeed looks like a bug with option A fix in @ruipinge you contributed |
I think similar to this I have: steps:
- name: Coveralls Finished
# yamllint disable-line rule:line-length
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # v2
with:
parallel-finished: true
carryforward: "\
run-macos-latest-3.10,\
run-ubuntu-latest-3.10,\
run-macos-latest-3.11,\
run-ubuntu-latest-3.11" I'm getting carryforward: "\ run-macos-latest-3.10,\ run-ubuntu-latest-3.10,\ run-macos-latest-3.11,\ run-ubuntu-latest-3.11" which won't work as intended. |
Bug reported adrienverge/yamllint#663 (comment). Sorry @p-j-smith, my bad.
Slightly similar, I have a schedule:
interval: daily
time: "06:00" where the quotes around the |
time: "06:00" and time: 06:00 are parsed identically in both pyyaml and yq (Go). Are you Sure that Dependabot needs it quoted? |
Thanks for your quick reply! Well, now I'm not sure if it's YAML in general or Dependabot-specific. Also I'm not familiar with all different types of YAML specification, so I couldn't find a hard rule on this. Certainly, when I use the version without quotes in my dependabot config, I get the error
The docs are not completely specific on the expected type (https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduletime). The example there also quote other strings that can be unquoted. |
@dorak88783 actually, it looks like with the YAML 1.1 |
Thanks, created #665. |
With a
.yamllint.yml
likeand a
test.yaml
likeI get the desired behavior of the backslash within double quotes
but yamllint thinks the quotes are redundant:
The quotes are not redundant - removing them changes the value of the string. After removing the quotes:
or removing both the quotes and the backslash
Is there a way to configure yamllint to allow quotes when they are not redundant, but not allow them when they are redundant?
The text was updated successfully, but these errors were encountered: