-
-
Notifications
You must be signed in to change notification settings - Fork 391
automation: Please, check/rewrite carrige return #2678
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
Comments
Looks like the pre-commit hook in the contributing docs has support for mixed line endings https://pre-commit.com/hooks . Not familiar myself with the tool, so not sure how easy it is to add. |
I am suffering it continuously, the repo has unix line endings as default in haskell-language-server/.editorconfig Line 7 in 47cb213
I have the .editorconfig extension installed in vscode so the project uses LF by default even for new files And i am a good boy and have So the hook formats my code correctly, changes new lines to CRLF and then the commit fail, then i revisit the file, save it again to make the editor correct line endings to LF and redo the commit 😟 //cc @bradrn |
Oh dear, sorry if I messed everything up! I merely ran the pre-commit hook and committed what it altered, including all the line ending changes. I also have had issues with line endings in my repos (thanks to |
Dont worry those are the little annoyances of develop in windows, we are in minority, so please, dont let me alone :-P I would suggest you switch to
|
Oh, believe me, I’ve tried… but eventually I gave up; the confusion it caused in my existing repos was just too great. One of these days I should try doing this again, to see if I can get any further.
OK, I’ve installed https://github.com/editorconfig/editorconfig-emacs.
Notepad does indeed have support for LF now! It was added in a recent update. |
Uh oh!
There was an error while loading. Please reload this page.
As diff in https://github.com/haskell/haskell-language-server/pull/2597/files shows - as a side-effect there - 15 files were rewritten fully (every line in them got
^M
, most probably due to Windows line break insertion).As a result, after merge that created additional challenges doing rebases or working with those files, since there are no longer diffs in the touched files.
Would be useful to prevent such diffs in the future.
The text was updated successfully, but these errors were encountered: