-
Notifications
You must be signed in to change notification settings - Fork 327
Closed
Labels
Description
Describe the bug
Given the following YAML:
food: ['apple','bread','croutons','dandriff','escargot','fettucine','gastronomy handbook']And the following in in settings.json:
An error is generated, because flow sequences aren't allowed. If you attempt to apply the quickfix code action to fix the problem, it results in invalid YAML, because the trailing ] is left in.
Note that this only happens when the flow sequence is at the very end of the document, which messes up the error range as well.
Expected Behavior
food:
- 'apple'
- 'bread'
- 'croutons'
- 'dandriff'
- 'escargot'
- 'fettucine'
- 'gastronomy handbook'Current Behavior
food:
- 'apple'
- 'bread'
- 'croutons'
- 'dandriff'
- 'escargot'
- 'fettucine'
- 'gastronomy handbook']Steps to Reproduce
- Make the above
- Use settings.json to forbid flow sequences
- Apply the code action to turn the flow sequence into a normal YAML list
Environment
- Windows
- Mac
- Linux
- other (please specify)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
{ // ... "yaml.style.flowSequence": "forbid" // ... }