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

Feature request > autofix support for key-ordering rule #208

Open
6 tasks done
hanqyu opened this issue Jul 30, 2023 · 1 comment
Open
6 tasks done

Feature request > autofix support for key-ordering rule #208

hanqyu opened this issue Jul 30, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@hanqyu
Copy link

hanqyu commented Jul 30, 2023

📜 Read (and accept) this before

  • I am respectful : this is free software and efforts are made on free time, with 💙
  • I have looked at the current project roadmap
  • I have already looked in current and past issues so I'm sure others did not already push a simlar issue
  • I make one single issue per feature request so the team can work efficienlty on it
  • I am aware of Unix philosophy : Make each program do one thing well
  • When (and if) your feature is implemented, be thankful and help promote the project by sharing the issue on social networks (twitter, linkedIn, dev.to...) and dropping the url on te issue

❔ Context

rules:
  key-ordering: enable

If yamlint config have key-ordering enabled, this library will not sort the keys in your yaml file in order. As a result of debugging, I was able to confirm that "No handler found for ~ (...)" was output.

DEBUG: (26+0, 11+0) => [wrong ordering of key "metrics" in mapping (key-ordering)]
DEBUG: No handler found for ("          ", "metrics: true")
DEBUG: UNHANDLED

💡 Proposed solution

Sort keys in order, compliant for yamllint's ordering rule

@hanqyu hanqyu added the enhancement New feature or request label Jul 30, 2023
@hanqyu hanqyu changed the title Feature request > Feature request > autofix support for key-ordering rule Jul 30, 2023
@hanqyu hanqyu changed the title Feature request > autofix support for key-ordering rule Feature request > autofix support for key-ordering rule Jul 30, 2023
@tamere-allo-peter
Copy link
Member

Thanks for your feedback. Currently yamlfixer lags behind from yamllint and unfortunately I don't have the time right now to improve it. I hope I'll be able to get back to it in a month or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants