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

Trim trailing whitespaces. #102

Merged

Conversation

turbanoff
Copy link
Contributor

Trailing whitespaces are useless. Most of code-styles forbids them. Most of editors always trim them on save.
I propose to clean up project from trailing whitespaces in all java files at once.

Trailing whitespaces are useless. Most of code-styles forbids them. Most of editors always trim them on save.
I propose to clean up project from trailing whitespaces in all java files at once.
@kriegaex
Copy link
Contributor

kriegaex commented Nov 20, 2021

I agree with you that trailing whitespace is useless. Since I started contributing here, I also cleaned up some files, usually when touching them anyway, changing something more substantial, according to the boyscout rule to leave the camp ground behind a little cleaner than I found it. Sometimes I refrain from cleaning up whitespace, though, in order to have small commits and retain a more meaningful result of git blame. If whitespace was changed, I need to trace back to a previous ancestor commit in order to found out who really committed a certain piece of code and why. I wish that Git had a blame mode ignoring whitespace. Maybe it has and I simply do not know. Do you, @turbanoff?

@turbanoff
Copy link
Contributor Author

turbanoff commented Nov 20, 2021

I agree that boyscout rule is a good way to reduce technical debt over time.
But often, such obvious "problems" make reviewers life harder - they generate noisy changes. For this one I believe it's better to pay this price once and forget about problem for a long time.

I use IntellIJ IDEA feature Annotate most often, instead of raw git blame. It ignores whitespaces by default
изображение
I believe it's possible with command line git too.
https://coderwall.com/p/x8xbnq/git-don-t-blame-people-for-changing-whitespaces-or-moving-code

@kriegaex
Copy link
Contributor

kriegaex commented Nov 20, 2021

I use IntellIJ IDEA feature Annotate most often, instead of raw git blame. It ignores whitespaces by default

I use IDEA, too. I am going to double-check what you just said, thanks for the hint. 🙂 Edit: I just checked, you are right. Thanks!

image

I believe it's possible with command line git too. https://coderwall.com/p/x8xbnq/git-don-t-blame-people-for-changing-whitespaces-or-moving-code

This looks promising, too. I am happy I asked and you replied.

@kriegaex
Copy link
Contributor

General hint: Because AspectJ is an Eclipse project, you need to sign the ECA (Eclipse Contributor Agreement) first, see also the ECA FAQ. I cannot merge PRs anyway, even if I wanted to (and I am not saying I do just yet). @aclement must do that for the time being, because I am still waiting for full committer status and the corresponding Eclipse and GitHub privileges.

Would you mind introducing yourself and explaining your sudden interest in AspectJ and burst of PRs?

@aclement
Copy link
Contributor

I forget where we are on this but ideally we should have the formatting rules embedded in the project for the main IDEs to keep project consistency going forward.

@turbanoff
Copy link
Contributor Author

Looks like it's already configured in .editorconfig to trim trailing whitespaces

https://github.com/eclipse/org.aspectj/blob/8b42ec9980b5a03c3d189156deb4b1212b26b793/.editorconfig#L20

It was just not applied to existing sources.

@aclement aclement merged commit 7a10203 into eclipse-aspectj:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants