Skip to content

Sort keys in application.yml.default#10981

Merged
aduth merged 6 commits intomainfrom
aduth-application-yaml-sort
Jul 25, 2024
Merged

Sort keys in application.yml.default#10981
aduth merged 6 commits intomainfrom
aduth-application-yaml-sort

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jul 24, 2024

🛠 Summary of changes

Updates normalize-yaml to support the ability to ignore sorting for specific keys, and applies key sorting to application.yml.default.

Why?

  • So it's easier for a developer to scan the file for a specific key, trusting that the file's keys are ordered alphabetically

📜 Testing Plan

  1. Reorder or add keys in application.yml.default.
  2. Run make normalize_yaml
  3. Verify that keys in application.yml.default are sorted

@aduth aduth marked this pull request as ready for review July 24, 2024 18:30
aduth and others added 5 commits July 24, 2024 15:31
changelog: Internal, Code Quality, Sort keys in application.yml.default
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@aduth aduth force-pushed the aduth-application-yaml-sort branch from e293891 to 195f954 Compare July 24, 2024 19:32
@aduth aduth merged commit 70f3152 into main Jul 25, 2024
@aduth aduth deleted the aduth-application-yaml-sort branch July 25, 2024 13:50
mitchellhenke pushed a commit that referenced this pull request Jul 31, 2024
* normalize-yaml: Add option to ignore keys in sorting

* Sort keys in application.yml.default

changelog: Internal, Code Quality, Sort keys in application.yml.default

* Clarify ignore key sort option in README

* Add spec for ignoreKeySort

* Improve formatting for original and expected output

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Fix comment annotation arrangement

---------

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants