Rubocop: rubucop 0.8 : carriage return

Created on 28 May 2013  路  7Comments  路  Source: rubocop-hq/rubocop

Under Windows, every line has a carriage return. The corresponding new cop should be disabled on Windows

Most helpful comment

Late for the party here, but I find this rule to be unexpected to be on by default for Windows. As normal git behaviour is to normalize line ending to default OS behaviour upon checkout. But upon check in they are normalized again.

All 7 comments

You're entitled to that opinion, but the style guide does say:

Use Unix-style line endings. (*BSD/Solaris/Linux/OSX users are covered by default, Windows users have to be extra careful.)

So rubocop is doing its job here, which is to enforce the Ruby Style Guide. Perhaps this issue belongs in that project.

@badal You can always configure your text editor to use Unix-style line-endings. Btw, I'm pretty sure there is no change from 0.7 regarding this.

First, I do not want to change Windows settings.
Second, there is a change form 0.7, this cop never appeared before.

If you give me an email address, I can send you 0.7 and 0.8 reports on the same files. You'll see the CR lines and new (and wrong) diags for missing spaces.

Just add:

EndOfLine:
  Enabled: false

to your .rubocop.yml. This cop has been around since RuboCop 0.3 if memory serves. No idea why it wasn't working for you before.

OK

Late for the party here, but I find this rule to be unexpected to be on by default for Windows. As normal git behaviour is to normalize line ending to default OS behaviour upon checkout. But upon check in they are normalized again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kirrmann picture kirrmann  路  3Comments

cabello picture cabello  路  3Comments

ecbrodie picture ecbrodie  路  3Comments

Aqualon picture Aqualon  路  3Comments

NobodysNightmare picture NobodysNightmare  路  3Comments