redhat-developer / redhat-developer/vscode-yaml
Formater simply removes the desired blank line between the last line of code and the following comment
Open
Nobody has claimed this yet.
formatter
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
The extension removes the blank line between the very last active line of code and a following comment block when saving.
In this example the very last line of code is only: issues:
Expected Behavior
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false
# Limit to only `issues` or `pulls`
only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo
Current Behavior
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false
# Limit to only `issues` or `pulls`
only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo
Steps to Reproduce
- insert the code example of the expected behavior lines into a yaml file
- save the file
- the desired blank line between
only: issues
and
# Optionally, specify configuration settings just for `issues` or `pulls`
is simply removed.
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 the issue in a YAML file using the formatter on save, comparing the expected and current examples around only: issues. Trace the YAML formatting entry point and existing formatting tests, then verify that the blank line before the following comment block is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100