Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 414748

Summary: Autoremove trailing whitespace in Gerrit
Product: Community Reporter: Lars Vogel <Lars.Vogel>
Component: GerritAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: gamma32, john.arthorne, Lars.Vogel, matthias.sohn, pwebster
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Lars Vogel CLA 2013-08-09 05:14:01 EDT
Currently the person who uploads a Gerrit review is responsible for removing trailing whitespace. AFAIK every Eclipse project discourages the usage of trailing whitespace.

I see a lot of reviews including my own reviews in which the code by itself is more or less ok but the reviewer (including myself) complains that trailing whitespace should be removed.

Does Gerrit has an option to remove the trailing whitespace automatically for a new review? If yes, I strongly suggest to activate that as I think that would make contributions much more effective.
Comment 1 Matthias Sohn CLA 2013-08-09 17:06:00 EDT
No, AFAIK Gerrit doesn't have a feature like that. Also it would be a strange feature for a Git server to modify commits pushed to it. I'd not want the Git server to tamper with commits I am pushing to it.

Instead bug 251824 should be fixed since Eclipse knows more about which syntax is ok for which language.
Comment 2 Lars Vogel CLA 2013-10-21 06:46:41 EDT
> Instead bug 251824 should be fixed since Eclipse knows more about which
> syntax is ok for which language.

I agree. Thanks Matthias for clarification.