-
Notifications
You must be signed in to change notification settings - Fork 53
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
refactor: Renormalize to ensure consistent file line termination. #226
refactor: Renormalize to ensure consistent file line termination. #226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple & automated, so looking fine.
see my comments in core-dev. Really prefer we dont do this now |
d9c7c8f
to
b3194d7
Compare
Codecov Report
@@ Coverage Diff @@
## develop #226 +/- ##
========================================
Coverage 58.12% 58.12%
========================================
Files 103 103
Lines 10224 10224
========================================
Hits 5943 5943
Misses 3647 3647
Partials 634 634
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After meticulously reviewing all 54,000 add/deletes, I give this 2 👍 up.
Actually I just ran a local renormalize command and made sure it matched yours. :)
…urcenetwork#226) * Add git attributes * Renormalize the files
ISSUE:
Resolves #225
DESCRIPTION:
Git diff shows added lines and removed lines that are exactly the same except (LF or CRLF line endings, which aren't even visible). This makes reviewing diffs very painful, specially linter refactoring that modifies lots of lines, the files show up as if the line from each file was removed and then added (can't really compare properly).
Hence this solution, with this config-based approach, we can ensure that our line endings remain consistent throughout our code-base regardless of what operating systems or local Git settings the developers use.
Beauty with this approach is that Windows and Linux users locally will keep what they want to use, when checked in they will consistently have LF line endings.
Note: We also ensures that binary files are not modified.
REFERENCE:
https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
Before PR:
After PR: