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

fix: support empty end_of_line in FinalNewline #184

Merged
merged 1 commit into from
Oct 13, 2021
Merged

fix: support empty end_of_line in FinalNewline #184

merged 1 commit into from
Oct 13, 2021

Conversation

KylePolansky
Copy link
Contributor

utils.GetEolChar(endOfLine) returns \n when end_of_line is not defined. This default contradicts the default \r\n line ending used in windows.

FinalNewline was requiring the final newline to be this default \n (unless otherwise defined), causing unexpected errors using windows default \r\n line endings.

This change removes the default validation against \n, and only validates against end_of_line when it is set.

Fixes: #164

Copy link
Member

@mstruebing mstruebing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, that is actually a really great PR!

@mstruebing mstruebing merged commit a339df4 into editorconfig-checker:master Oct 13, 2021
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

Successfully merging this pull request may close these issues.

Final Newline Bug under Windows
2 participants