Closed Bug 1432919 Opened 2 years ago Closed 2 years ago

When generating an eclipse project, turn on the "Remove trailing whitespace in edites lines" setting

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: botond, Assigned: botond)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → botond
I assume this was intended to filed for core and not calendar?
Whoops, my bad! Not sure how that happened.
Product: Calendar → Core
Comment on attachment 8945264 [details]
Bug 1432919 - Configure generated eclipse projects to remove trailing whitespace in edited lines.

https://reviewboard.mozilla.org/r/215482/#review221182

Thanks!

::: python/mozbuild/mozbuild/backend/cpp_eclipse.py:749
(Diff revision 1)
> +removeTrailingWhitespace=true
> +removeTrailingWhitespaceEditedLines=true

I'd have expected the first of these two lines to mean that all trailing whitespace is removed, even from non-edited lines. I assume that you checked that's not the case (the second line modifies the behavior of the first rather than being obsoleted by the first), so r+.
Attachment #8945264 - Flags: review?(jwatt) → review+
(In reply to Jonathan Watt [:jwatt] (needinfo? me) from comment #4)
> ::: python/mozbuild/mozbuild/backend/cpp_eclipse.py:749
> (Diff revision 1)
> > +removeTrailingWhitespace=true
> > +removeTrailingWhitespaceEditedLines=true
> 
> I'd have expected the first of these two lines to mean that all trailing
> whitespace is removed, even from non-edited lines. I assume that you checked
> that's not the case (the second line modifies the behavior of the first
> rather than being obsoleted by the first), so r+.

Yeah, it's a bit weird that way.

You can see it in the CDT source code [1]:

	 * If REMOVE_TRAILING_WHITESPACE is enabled, this option limits the scope of
	 * the removal to edited lines only. This option has no effect if
	 * REMOVE_TRAILING_WHITESPACE is disabled.

[1] https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/PreferenceConstants.java?id=ee784263c237a99b54d919b2aa9737d87986a4fd#n1003
(I've also verified that it works as described.)
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/33cbc21d6d7c
Configure generated eclipse projects to remove trailing whitespace in edited lines. r=jwatt
https://hg.mozilla.org/mozilla-central/rev/33cbc21d6d7c
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.