T D Nguyen
T D Nguyen

Reputation: 7613

Is that necessary for checking "inconsistency of line endings" VS

I am using VS 2017 on only Windows. However, it frequently pops up the warning “inconsistent line endings”.

I found a solution to turn it off from this link. But then I have some questions related to this issue:

  1. I use only Windows, why does it have such inconsistency?
  2. If we can turn this off then is it any benefit of enabling it?

Upvotes: 0

Views: 42

Answers (1)

Stanislas
Stanislas

Reputation: 2020

I recommend reading: https://en.wikipedia.org/wiki/Newline

In particular these 3 sections:

The inconsistencies generally come from: copy-pasted code, snippets, using different editors/environments or through a file transfer protocol (or code repository).

As for the benefit: it can cause issues where the content is either not displayed in a human-readable fashion or the content is misinterpreted by a process (i.e. compiler).

Upvotes: 0

Related Questions