-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
trailing spaces cleanup #2659
trailing spaces cleanup #2659
Conversation
It's great PR, but I don't think removing trailing spaces in the whole project is a good idea. For example the Also It would be great to add something like pre-commit git hook to detect trailing whitespaces - without that all this work would be worthless. |
True, could be used for a number of other static checks as well. The major problem: hooks are local to the repository (clone) and are thus not distributed automatically. Hence, every developer would have to set up the pre-commit hook manually. GitHub does not support pre-receive hooks to do such things upstream. |
I agree with @galjonsfigur that such sources should be left untouched. As consequence, this would apply to a number of sub-trees where we potentially have updates. E.g.
Can this be scripted - like a target in the Makefile? |
Sure, a Git hook is just a shell script that becomes a Git hook by having a specific name and by residing in a specific folder ( |
See my #2648 (comment). We do need to review all of these changes and if we are going to do this, then we need a separate commit to recode any cases where trailing spaces are material first so that we can be confident by convention that we can do a bulk trailing space removal. Also once we've done this, then adding a tab and trailing whitespace check could also be implemented. |
I did the comparison. All looks OK. |
Fixes #2648
dev
branch rather than formaster
.docs/en/*
.There are a lot of trailing spaces that reduces readability and should be cleaned up.