Convert all files to LF file ending #209
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again, since my previous (first!) pull request was appreciated I prepared another, more radical, one.
LF is the defacto standard since it's used by Mac and Linux and Windows are mostly fine with it (batch files may be the only exception where LF endings cause troubles). Until this commit most of the files in this repo used a LF line endings anyway, the only exception were *.ino files which mostly used CRLF with couple of lines with LF. These mixed line endings cause troubles to those using VSCode since it doesn't support it (microsoft/vscode#127) so it's impossible to save a changed file without normalizing its line endings (and making the commit much bigger). This commit also introduces .gitattribute and .editorconfig files which will ensure correct formating in the future (strangely Arduino IDE doesn't support the latter one arduino/Arduino#8804).
I'm aware that this commit will make using of
git blame
and exploring of the project history a bit more difficult but it's better to bite the bullet now than later. Also I didn't send this pull request just to make the repo nice and tidy but to prepare the surface for more pull requests I have in the queue.Here's a nice blog post about git and line edings if you want to learn more: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
Thanks!