You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Validation for map key order
Adds a new validation that checks if the keys
of a map are in alphabetical order. Updates the
tests to cover the new validation.
* Add settings for keyOrdering
Adds a setting to control keyOrdering feature.
Tests if the new setting works as expected.
Starts using the new setting to enable the feature.
* add CodeAction to fix map order
Adds a new codeaction that fixes the map order
by rewriting the ast with the alphabetical order
of keys.
* Update docs for keyOrdering
Updates readme and changelog with the information
for the new feature.
* Preserve comments
Adds tests and updates the logic to preserve
comments and spaces.
---------
Co-authored-by: Muthurajan Sivasubramanian <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
### [UNRELEASED]
2
+
3
+
- Add: Enforce alphabetical ordering of keys in mappings and provide codeaction to fix it.
4
+
1
5
### 1.11.0
2
6
- Fix: only the first choice is shown when hovering anyOf-typed properties [#784](https://github.com/redhat-developer/vscode-yaml/issues/784)
3
7
- Fix: Description in the schema root does not get displayed [#809](https://github.com/redhat-developer/vscode-yaml/issues/809)
Copy file name to clipboardExpand all lines: README.md
+1
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@ The following settings are supported:
52
52
-`yaml.suggest.parentSkeletonSelectedFirst`: If true, the user must select some parent skeleton first before autocompletion starts to suggest the rest of the properties.\nWhen yaml object is not empty, autocompletion ignores this setting and returns all properties and skeletons.
53
53
-`yaml.style.flowMapping` : Forbids flow style mappings if set to `forbid`
54
54
-`yaml.style.flowSequence` : Forbids flow style sequences if set to `forbid`
55
+
-`yaml.keyOrdering` : Enforces alphabetical ordering of keys in mappings when set to `true`. Default is `false`
0 commit comments