redhat-developer / redhat-developer/vscode-yaml
formatter removes end of document (...) directive.
Open
Nobody has claimed this yet.
formatter
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
I have yaml file like this:
---
tenantName: testTenant
actions:
- action: create
objectType: tenant
tenant:
name: testTenant
...
---
tenantName: testTenant
actions:
- action: create
objectType: attribute
signal:
name: helloAttrOld
...
---
tenantName: testTenant
actions:
- action: update
objectType: attribute
attributeName: helloAttrOld
attribute:
name: helloAttr
...
---
# similar things
...
But the auto formatter just removes the end of document directives (...) and only keeps the start of the document directive (---).
is there something that I can configure to get around it?
Environment: linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the formatter behavior in VS Code using the multi-document YAML example in the issue. Start by tracing the YAML formatter entry point and compare the formatted output with the input; done means preserving each document-end (...) directive while continuing to format the content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100