Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stick to one Style of indenting Arrays #4

Open
cocker-cc opened this issue Apr 23, 2022 · 2 comments
Open

Stick to one Style of indenting Arrays #4

cocker-cc opened this issue Apr 23, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@cocker-cc
Copy link

cocker-cc commented Apr 23, 2022

For YAML there are two equally valid styles of indenting Arrays:
Elements indenting the Dash:

a:
  - bli
  - bla
  - blubb

Elements not indenting the Dash:

b:
- schni
- schna
- schnuck

yaml-sort should stick with one of them. As the Output of Ruby's Hash#to_yaml uses "not indenting Array-Elements" I strongly prefer this one.

@smortex
Copy link
Owner

smortex commented Apr 24, 2022

The initial idea is to stick to the current file style: reorder items without changing the way items are written (e.g. do not remove redundant quotes or reindent lists).

But I have nothing against such an opt-in feature to add support for "normalization".

@smortex smortex added the help wanted Extra attention is needed label Apr 24, 2022
@cocker-cc
Copy link
Author

opt-in feature to add support for "normalization"

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants