Skip to content
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

Fixing line endings consistency in the whole repository and making sure everything is formatted #1244

Merged
merged 4 commits into from Dec 2, 2020

Conversation

jimon
Copy link
Contributor

@jimon jimon commented Nov 17, 2020

Unity by convention follows LF-everywhere approach, and our tooling, for example the formatter, is inclined to reformat into LF if line endings are not consistent.

This PR attempts to achieve:

  • Asks git to store everything in LF.
  • Asks git to checkout VS/Windows-specific files as CRLF.
  • Provides a .repoconfig for our formatting tool to ignore some folders.
  • Renormalizes all stored files, we had tons of files actually stored as CRLF inside the repository.
  • Formats all stored files, a few of them had inconsistent tabulation.

Result of this change:

  • When running git add --renormalize . no files are changed (tested on Windows and Mac).
  • When running perl %pathtotheinstall%/format.pl all no files are changed (tested on Windows and Mac).

@jimon jimon changed the title Fixing formatting on Windows (WIP) Fixing formatting on Windows Nov 17, 2020
@jimon jimon force-pushed the fixing-checkout-line-endings branch 2 times, most recently from 538989f to d4d39e3 Compare November 19, 2020 13:36
@jimon jimon force-pushed the fixing-checkout-line-endings branch from d4d39e3 to 027de8a Compare November 19, 2020 14:01
@jimon jimon changed the title (WIP) Fixing formatting on Windows Fixing line endings consistency in the whole repository and making sure everything is formatted Nov 19, 2020
@jimon jimon requested a review from Rene-Damm November 19, 2020 14:17
Copy link
Contributor

@Rene-Damm Rene-Damm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have ideally merged this one first. Anyway, I'll go sync it to latest develop and merge.

@Rene-Damm Rene-Damm merged commit ccf7193 into develop Dec 2, 2020
@Rene-Damm Rene-Damm deleted the fixing-checkout-line-endings branch December 2, 2020 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants