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

ability to distinguish between different yaml file types #292

Closed
ssbarnea opened this issue Jul 27, 2020 · 0 comments
Closed

ability to distinguish between different yaml file types #292

ssbarnea opened this issue Jul 27, 2020 · 0 comments

Comments

@ssbarnea
Copy link
Contributor

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.

@ssbarnea ssbarnea closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2023
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

No branches or pull requests

1 participant