1

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?

Uday Magdum
  • 77
  • 1
  • 6

1 Answers1

12

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
  • 914
  • 8
  • 7