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

Default output formatting conflicts with yamllint #671

Closed
lucasgonze opened this issue May 14, 2022 · 1 comment
Closed

Default output formatting conflicts with yamllint #671

lucasgonze opened this issue May 14, 2022 · 1 comment

Comments

@lucasgonze
Copy link

  1. Generate an object
  2. Output yaml using js-yaml
  3. Feed the output into yamllint
  4. There will be collisions with default rules:
  • "too few spaces before comment" (1 space before comment at end of line instead of 2)
  • padding square brackets with spaces
  • in one case a whitespace line with nothing but 10 spaces

This issue is flowing from one in mheap/pin-github-action#74, which itself flowed out of an issue in the magma/magma repo.

@rlidwka
Copy link
Member

rlidwka commented Nov 19, 2023

I think we would have the same answer as yaml:
eemeli/yaml#398 (comment)

This library is primarily a parser. We don't provide many formatting options, because that's a bottomless pit of feature requests for every single style choice out there.

Thus, I'd recommend using a dedicated yaml formatter if formatting matters for you.

@rlidwka rlidwka closed this as completed Nov 19, 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

2 participants