-
Notifications
You must be signed in to change notification settings - Fork 47
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
Final Newline Bug under Windows #164
Comments
Any ETA for this fix? This single issue is the only real blocker for using editorconfig-checker to validate Git repositories right now. Disabling EOL checks is not a viable option since some file types need to enforce a specific EOL and that option would have global effect. |
If I remember correctly I don't think that we are currently supporting unset. |
Thanks a lot, I really appreciate it. |
All of the love goes straight to @KylePolansky :) |
Update NPM Package?It's great to see that the Windows EOL bug was fixed. Unfortunately the NPM package still lags behind to core 2.3.5. Any chances you could update the NPM package so we can use it in production? Thanks. |
As of version 2.7.2, I'm still experiencing this problem if I keep The problem is that if there is a catch-all pattern definition ( Unfortunately, at the EditorConfig project they are not willing to consider Editorconfig-checker could obviate to this limitation by either:
I personally would prefer the former solution, since (assuming version control as a main use-case for editorconfig-checker) it would enforce EOL consistency — whereas For such cases, editorconfig-checker could support the non-official value |
Under Windows, editorconfig-checker raises false-positive errors for final new lines in files that are set as
insert_final_newline = unset
or don't have that setting at all — i.e. it seems a problem with the internal default EOL expectation for final new lines.Because the EditorConfig specification refuses to add support for
native
EOLs, in cross-platform Git repositories, we need to configure those file extensions asend_of_line = unset
, and rely on.gitattributes
settings to validate them at commit time.But under Windows, editorconfig-checker always reports the following error for files that are using native EOL (i.e.
CRLF
locally, under Win OS) and which are configured asend_of_line = unset
in.editorconfig
:Even if I comment the
end_of_line = unset
line I get the same error. The only way to pass validation is to useend_of_line = crlf
instead — which is going to mess up these files under Linux and macOS.It seems to be a problem with the default editorconfig-checker settings for EOLs, which might be taking over whenever the
end_of_line
is missing or= unset
.If I disable the EOL checks via the
-disable-end-of-line
option, the errors go away. So this problem seem to only affect ending line checks, not EOLs in the file body.It might also be a good idea to add an extra editorconfig-checker setting/option to support native EOLs during validation, regardless of the fact that the original EditorConfig spec doesn't support it, since this feature makes sense when validating projects.
The text was updated successfully, but these errors were encountered: