redhat-developer / redhat-developer/vscode-yaml
Company like header comments like #--- get formatted to something very different
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
Company like comment headers get formatted from
#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)
#------------------------------------------------------------------------------
to
--- #------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)
Expected Behavior
I would expect it to remain the same, ie not be reformatted. Ie look like:
#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)
#------------------------------------------------------------------------------
Current Behavior
Got reformatted to
--- #------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)
Steps to Reproduce
- create a empty yaml file with any content
- add
#---(minimum of 3 dashes after#at the top of the file (first line) - on vscode save to reformat
- see that it reformatted to something like (added a newline with
---before the original line)
---
#---
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
Reproduce this in an empty YAML file using the VS Code formatter, starting with a first-line comment containing at least three dashes after #. Trace the YAML formatting entry point that adds the document marker and newline, then verify that the company-style header remains unchanged after formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100