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
When an inline comment is in a sequence, Yaml formatters like Prettier and the Redhat YAML VSCode extension format it like so:
---
foo: [1,# Comment]
However, this produces the following warning and error from yamllint 1.35.1.
Command: yamllint test.yaml
Output:
test.yaml
3:8 warning too few spaces before comment (comments)
4:3 error wrong indentation: expected 0 but found 2 (indentation)
I confirmed that test.yaml can be loaded with Python's Yaml package.
Is yamllint using an overly strict indentation check here? Or is it the formatters' fault for not aligning the closing brace with the previous block of code?
The text was updated successfully, but these errors were encountered:
Why use the compact/JSON notation if you're going to break it into multiple lines anyway? This is more concise and the more "YAML" way of doing the same thing.
Hello,
When an inline comment is in a sequence, Yaml formatters like Prettier and the Redhat YAML VSCode extension format it like so:
However, this produces the following warning and error from yamllint 1.35.1.
Command:
yamllint test.yaml
Output:
I confirmed that test.yaml can be loaded with Python's Yaml package.
Is yamllint using an overly strict indentation check here? Or is it the formatters' fault for not aligning the closing brace with the previous block of code?
The text was updated successfully, but these errors were encountered: