-
Notifications
You must be signed in to change notification settings - Fork 13
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
Empty files should pass with insert_final_newline = true #43
Comments
This is an interesting corner case. Thanks for the report, @vrevelas. I asked about that in the editorconfig project editorconfig/editorconfig#416 |
ppalaga
changed the title
Empty files cause insert_final_newline error
Empty files should pass with insert_final_newline = true
Dec 22, 2019
ppalaga
added a commit
to ppalaga/editorconfig-linters
that referenced
this issue
Dec 22, 2019
Fixed by upgrading to editorconfig-linters 0.1.2 131eb51 |
Fixed in the just released version 0.0.11. Thanks again for the report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Empty files, such as
__init__.py
cause errors like__init__.py@1,1: Insert lf - violates insert_final_newline = true, reported by org.ec4j.linters.TextLinter
when using a .editorconfig file likeAdding a newline to these empty files as a workaround suppresses the error from this plugin, but then fails pylint checks (trailing-newlines check).
Excluding init.py files is also not ideal, as they are often empty, but sometimes contain code that should be checked.
I think the correct behaviour here would be to ignore empty files when checking for trailing newlines.
The text was updated successfully, but these errors were encountered: