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

Remove Trailing Whitespace #10398

Closed
wants to merge 1 commit into from

Conversation

a-szegel
Copy link
Member

Removes trailing whitespace in one spot to allow IDE's to enable the auto-remove
trailing whitespace setting without adding a lot of extra diffs to
commits. When you make a 1 line change in a file and have 100 lines of
trailing whitespace changes in the diff, it is time consuming to review.

Signed-off-by: Seth Zegelstein szegel@amazon.com

Removes trailing whitespace in one spot to allow IDE's to enable the auto-remove
trailing whitespace setting without adding a lot of extra diffs to
commits. When you make a 1 line change in a file and have 100 lines of
trailing whitespace changes in the diff, it is time consuming to review.

Signed-off-by: Seth Zegelstein <szegel@amazon.com>
Copy link
Member

@bwbarrett bwbarrett left a comment

Choose a reason for hiding this comment

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

I'm ok with the changes, but I'm not sure if the trailing whitespace in the RST files has any special meaning. @jsquyres should chime in on those changes before this gets committed.

@bwbarrett bwbarrett requested a review from jsquyres May 16, 2022 22:28
@devreal
Copy link
Contributor

devreal commented May 17, 2022

This is the same as the infamous clang-format patch: it pollutes the git history and makes git blame virtually useless. The actual benefit of whitespace-only changes for the community is asymptotically approaching zero. IMHO, you should fix your editor to remove whitespaces only on lines or files you edited or at least provide a substantive change that justifies changing the files.

@a-szegel
Copy link
Member Author

The trim trailing whitespace on only lines edited is a good idea, but it is still a feature idea with VSCode: microsoft/vscode#1315 (for 5 years now). To fix git blame, you can do: git blame --ignore-rev <this commit> (and have the blame that you were looking for). I think this change will make cleaner PRs in the future, which is worth the price of an extra argument to git blame, and 1 additional commit in the history.

@jsquyres
Copy link
Member

@a-szegel I realize that the concept of a whitespace-fixing-only set of commits is a bit controversial, but would it be possible to separate out the whitespace fixes to files that end in .rst? Those are just docs files, and it looks like there's only 1 line in each file that it's fixing (all the man page *.rst files were automatically generated, and perhaps we had a bug in the python that generated them that included a rogue line that contained just a space).

@jsquyres
Copy link
Member

Since this PR became controversial, I extracted the part of this commit that fixes the whitespace in the RST man pages and put that in #10652.

@wckzhang
Copy link
Contributor

wckzhang commented Mar 2, 2023

Since it looks like we're not moving forward with this change, I'm closing this PR. Please re-open if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants