redhat-developer / redhat-developer/vscode-yaml
Applying a Compose completion item makes my YAML file malformed
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
Code completion "in between" another attribute seems to "reuse" the content after it and produces a malformed YAML file.
Expected Behavior
Applying a completion item produce a reasonable YAML file perhaps missing an attribute's value for me to type.
Current Behavior
Applying this completion item has made my YAML file look even worse than it started.
Steps to Reproduce
- Create
compose.yamlwith the content below. - Invoke code completion on the
- biline. - Accept the
bindand the applied content appears to be corrupt. - I only have the Red Hat extension enabled and the Docker ones have been disabled.
services:
test:
volumes:
- bi
type: tmpfs
https://github.com/user-attachments/assets/bb68f459-47ea-430f-aab5-7b36e3958df8
Environment
- Windows
- Mac
- Linux
- other (please specify)
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
Start by reproducing the issue in compose.yaml with completion invoked on the - bi line and the bind item accepted. Compare the resulting document with the expected valid YAML and verify that completion no longer reuses the following type: tmpfs content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100