Bug 528362

Summary: Clean up trailing white space in jdt.core and jdt.ui
Product: [Eclipse Project] JDT Reporter: Andrey Loskutov <loskutov>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, noopur_gupta, stephan.herrmann
Version: 4.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Andrey Loskutov CLA 2017-12-09 13:50:27 EST
jdt.core and ui code contains lot of trailing white space (226 and 545 files). This is messy and should be fixed. After that we can set cleanup action on save so that it automatically removes whitespace.
Comment 1 Stephan Herrmann CLA 2017-12-09 15:11:07 EST
Thanks, Andrey, for caring about code quality, but ...

I prefer a clean, high-quality history over white space aesthetics.

I'm aware of two main contributors to trailing white space:
(1) indentation of empty lines
(2) unhappy formatting of "+ " joined strings in tests
(The fact that this trailing blank is systematically created in the first place could be seen as a bug worth fixing)

Regarding (1) I couldn't care less.
(2) makes me worried that this cleanup would change almost all lines in tests, which IMO is a no-go as it decreases the value of blame information.

Ergo: the clean-up would incur new pain. You'd need to demonstrate a huge benefit (e.g., tons of contributions *blocked* by it :) ) to justify this change.

I will leave it at this and not comment more, because I think we all are overbooked with more important work.
Comment 2 Noopur Gupta CLA 2017-12-11 01:25:46 EST
(In reply to Stephan Herrmann from comment #1)
> I prefer a clean, high-quality history over white space aesthetics.
>
> Ergo: the clean-up would incur new pain. You'd need to demonstrate a huge
> benefit (e.g., tons of contributions *blocked* by it :) ) to justify this
> change.
+1.
Comment 3 Till Brychcy CLA 2017-12-11 04:40:24 EST
(In reply to Stephan Herrmann from comment #1)
> Regarding (1) I couldn't care less.
> (2) makes me worried that this cleanup would change almost all lines in
> tests, which IMO is a no-go as it decreases the value of blame information.
> 

I think enabling "Preferences > Team > Git > Ignore Whitespace changes " should solve that. (But it would be better to verify this before doing a bit commit)