-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
EndOfLine cop broken for UTF-8 files #668
Comments
Hi @marten , I just tried it with following example and it works for me. Only difference I can see is, you are using a # encoding: UTF-8
class Admin::DashbordsController < ApplicationController
' same sample text'
end
or probably since I'm very new to rubocop, I might be missing something 😕 |
@sameera207 I think you might simply not see the issue because you don't have any UTF-8 characters like ö or é in your example file. But it's possible that something is wrong with my setup. Could you try inserting an o-umlaut in your "same sample text"? |
The example source code doesn't trigger an exception for me. @jonas054 can you try to reproduce this as well? |
@bbatsov I was unable to reproduce the error using the sample code as well.
Output from
|
@marten , I tried with the same code that you have # encoding: UTF-8
class Admin::DashbordsController < ApplicationController
'terecht bij uw ROM-coördinator.'
end and still working fine for me :).
|
I was finally able to reproduce the error! The key is to set the environment variable
I thought at first that this means there's a bug in RuboCop, but maybe that's not the case. What's your setting of the |
I'm back to thinking that this is a bug in RuboCop. The special thing about |
[Fix #668] Use encoding from Parser in call to IO.read in EndOfLine.
Awesome! Thanks a lot! |
Example file (
app/controllers/epd/reports_controller.rb
):Output from Rubocop:
The text was updated successfully, but these errors were encountered: