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

Newline at end of file #186

Open
sherif-fanous opened this issue Jan 22, 2024 · 0 comments
Open

Newline at end of file #186

sherif-fanous opened this issue Jan 22, 2024 · 0 comments

Comments

@sherif-fanous
Copy link

This issue was previously discussed in #31

The problem is that the proposed workaround of using "files.insertFinalNewline": true only works when sorting a file using YAML Sort: Sort YAML or one of the YAML Sort: Custom sort options. It does not work with the YAML Sort: Recursively sort all files options.

As a result using YAML Sort: Recursively sort all files leads to a large number of files being flagged as modified by git due to the newline at the end of the file being trimmed.

It would be really useful to have an option to retain the newline.

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