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
In order to be able to perform a good linting of YAML files, yamllint needs to know the nature of the files.
For examples #288 enables sorting of map keys, something really desirable for generic data storage but not desirable in all cases, counter examples below:
ansible tasks prefer having name as first key
zuul actions/workflows would want name as first key
zuul CI: would prefer name of jobs as first key too
Yes, almost all the time when someone uses a "name" key, they would want this to be the first key of the mapping. Still, harcoding a deliberate exception to the unbiased alphabetical sorting does not seem like a good idea either.
Mainly the decision about sorting logic should be dependent on the YAML file schema, something that was not yet accepted as part of the YAML spec. I guess we need to ping yaml spec writers to get their support and at least document the likely way this would be defined.
The text was updated successfully, but these errors were encountered:
In order to be able to perform a good linting of YAML files, yamllint needs to know the nature of the files.
For examples #288 enables sorting of map keys, something really desirable for generic data storage but not desirable in all cases, counter examples below:
Yes, almost all the time when someone uses a "name" key, they would want this to be the first key of the mapping. Still, harcoding a deliberate exception to the unbiased alphabetical sorting does not seem like a good idea either.
Mainly the decision about sorting logic should be dependent on the YAML file schema, something that was not yet accepted as part of the YAML spec. I guess we need to ping yaml spec writers to get their support and at least document the likely way this would be defined.
The text was updated successfully, but these errors were encountered: