Skip to content

Fix source code using Windows newline#12248

Merged
fabaff merged 3 commits intohome-assistant:devfrom
OttoWinter:fix-crlf
Feb 9, 2018
Merged

Fix source code using Windows newline#12248
fabaff merged 3 commits intohome-assistant:devfrom
OttoWinter:fix-crlf

Conversation

@OttoWinter
Copy link
Copy Markdown
Member

Description:

The developer documentation states:

  • Line separator should be set to LF.

This PR converts all source files to using Unix newlines \n instead of Windows newlines \r\n. You can replicate this by running

find homeassistant/ tests/ -name '*.yml' -o -name '*.py' -type f -print0 | xargs -0 perl -pi -e 's/\r\n|\n|\r/\n/g'

(Partly taken from https://stackoverflow.com/a/14155400/8924614)

Checklist:

  • The code change is tested and works locally.

@OttoWinter OttoWinter changed the title 🚜 Fix use Unix newline Fix use Unix newline Feb 8, 2018
@OttoWinter
Copy link
Copy Markdown
Member Author

I don't know whether I should include this in this PR, but there also seem to exist some "wrong" file permissions in the repo:

mode change 100755 => 100644 homeassistant/components/binary_sensor/mercedesme.py
mode change 100755 => 100644 homeassistant/components/camera/xeoma.py
mode change 100755 => 100644 homeassistant/components/device_tracker/mercedesme.py
mode change 100755 => 100644 homeassistant/components/mercedesme.py
mode change 100755 => 100644 homeassistant/components/remote/xiaomi_miio.py
mode change 100755 => 100644 homeassistant/components/sensor/mercedesme.py

@OttoWinter OttoWinter changed the title Fix use Unix newline Fix source code using Windows newline Feb 8, 2018
@fabaff
Copy link
Copy Markdown
Member

fabaff commented Feb 8, 2018

Please include it in this PR.

@OttoWinter
Copy link
Copy Markdown
Member Author

Done 🎨

Copy link
Copy Markdown
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

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

Thanks 🐦

@fabaff fabaff merged commit 2ae0c56 into home-assistant:dev Feb 9, 2018
@balloob balloob mentioned this pull request Feb 9, 2018
@OttoWinter OttoWinter mentioned this pull request Feb 12, 2018
@OttoWinter OttoWinter deleted the fix-crlf branch March 13, 2018 20:18
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants