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
yamlfmt allows to have the start token ---, but doesn't yet allow for end token .... That would be very useful for projects where this is needed, as for now yamlfmt will just remove the end token, making projects linters fail.
Implementation would be similiar to include_document_start.
The text was updated successfully, but these errors were encountered:
Hi @alexandrebrg thanks for the feature request! I think it makes sense.
I think the only way to do this where yamlfmt actually handles multi-document files properly is to modify the yaml library. It shouldn't be too difficult, I forget if in the Node data structure there is an end to the document, but I am reasonably certain that it should work by adding something to the function that triggers on a yaml_DOCUMENT_END_EVENT here: https://github.com/braydonk/yaml/blob/10bcc859418b821726f51e2beb7406449cf0b4a2/emitterc.go#L499-L527
If you are willing to give it a shot I would certainly encourage it! My time is even more limited to work on this project recently. I'll be happy to review any PRs to braydonk/yaml and can tag a new release whenever it gets merged so it can be used in yamlfmt.
Hello 👋
yamlfmt
allows to have the start token---
, but doesn't yet allow for end token...
. That would be very useful for projects where this is needed, as for nowyamlfmt
will just remove the end token, making projects linters fail.Implementation would be similiar to
include_document_start
.The text was updated successfully, but these errors were encountered: