-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent line endings (LF vs CRLF) #4238
Comments
I am curious in how this would remove ambiguity for future contributors using different operating systems? |
Luckily, git has a solution for this! We should pair the above changes with a This allows developers to use their native EOL format while working with local files, but when those files are checked in they will be normalized to LF, which is what git prefers and what Github recommends. Again, the big advantage here is that it improves how diffs and merges appear, and eliminates confusion over whether a given PR should be converting the files it touches to one ending or the other. Because the repo hasn't been using |
Description
Line endings across the codebase are inconsistent between CRLF (Windows) and LF (Unix).
95% of files use LF (Unix), and the other 5% use CRLF (30 files total). There are no cases of line endings being mixed in one file.
This is definitely a nitpick issue, but it would be nice to fix to avoid any ambiguity for future contributors.
I've opened this as an issue rather than a PR because the diff would change every line in 30 files, making it hard to review and potentially a security concern. Instead, I've added some instructions on how to fix it below.
Instructions to fix
Install
dos2unix
util:Print a report of all line endings without changing anything (see this output in table below):
Convert all the line endings to LF:
Full report of line ending counts
Expand table
The text was updated successfully, but these errors were encountered: