0

For ROR development i am using windows subsystem for linux. work on ubuntu 20.

while running rubocop in project shows below issue for each file.

"Layout/EndOfLine: Carriage return character detected.

Any solution for same?

1 Answers1

4

It looks like you have a set of files with windows line endings (CRLF) on a unix (LF) system which is causing the warnings.

The rubocop config file allows you to edit the warnings for line endings.

See https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml#L582

To disable, create a .rubocop.yml file with the following contents in your application base directory:

Layout/EndofLine:
   Enabled: False

To change the line endings to unix style en-masse you can use dos2unix.

See How can I run dos2unix on an entire directory?

3DPrintScanner
  • 604
  • 5
  • 6