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

Fix: Allow fixing files with missing newline at end #8

merged 1 commit into from Feb 23, 2020


Copy link

@nielsmh nielsmh commented Nov 18, 2018

If a file is missing newline at the end you should still be allowed to fix that missing NL, or delete the file.

Note that this might also yell at you if you edit a file with missing NL, and don't repair the missing NL.

@@ -146,6 +150,14 @@ git_good reset case5.cpp
git_good add case6.cpp
test_commit_bad "Add: NL at EOF"
git_good reset case6.cpp
git_good rm case61.cpp
test_commit_good "Remove: File with missing NL at end"
sed -i '{s/bar/pub/}' case62.cpp
Copy link
Contributor Author

@nielsmh nielsmh Nov 18, 2018

Choose a reason for hiding this comment

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

sed -i is technically non-standard, but the alternatives are far more verbose.

Copy link

@glx22 glx22 commented Jan 23, 2020

Seems correct to me, but I'm not the best python reviewer ;)

glx22 approved these changes Feb 23, 2020
@glx22 glx22 merged commit 5fdc031 into OpenTTD:master Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants