Skip to content
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

Empty document errors with: "expected ..." #5

Open
wrdls opened this issue Dec 31, 2024 · 0 comments
Open

Empty document errors with: "expected ..." #5

wrdls opened this issue Dec 31, 2024 · 0 comments

Comments

@wrdls
Copy link

wrdls commented Dec 31, 2024

A yaml file like this

a: b
---
# some comment
---
b: c
d: 123

generates the following error:

❯ dprint fmt test.yaml
Error formatting test.yaml. Message: parse error at line 5, column 2
  |
5 | b: c
  |  ^
expected `...`
Had 1 error formatting.

These kind of documents are pretty common in Kubernetes yaml files generated by Helm, where range and/or if statements leads to empty documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant