ContentMine / euclid

ContentMine Fork of the WWMM Euclid Package
0 stars 3 forks source link

Mac style line endings present #3

Open ghost opened 7 years ago

ghost commented 7 years ago

pom.xml contains Mac-style line endings (i.e. CR, aka '\r' or '^M'). These pollute the output of git diff, which expects UNIX-style line endings (i.e. LF, aka '\n'):

$ wc -l pom.xml 
124 pom.xml
$ grep '\r' pom.xml | wc -l
68
$ grep '\n' pom.xml | wc -l
69
$ grep '\n\r' pom.xml | wc -l
0
$ grep '\r\n' pom.xml | wc -l
0

Looks like about 200 source code files have this issue:

$ grep -rl '\r' src | wc -l
202
ghost commented 7 years ago

Relevant reading:

https://www.hanselman.com/blog/YoureJustAnotherCarriageReturnLineFeedInTheWall.aspx https://stackoverflow.com/questions/170961/whats-the-best-crlf-carriage-return-line-feed-handling-strategy-with-git https://help.github.com/articles/dealing-with-line-endings/