Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325936 - [devel] use correct indentation clean-up?
Summary: [devel] use correct indentation clean-up?
Status: RESOLVED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext Backlog (show other bugs)
Version: 1.0.1   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 05:01 EDT by Knut Wannheden CLA
Modified: 2017-07-11 14:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Wannheden CLA 2010-09-22 05:01:58 EDT
I have noticed that not all of Xtext's Java source files consistently use tabs for line indentation. In some files tabs and spaces are happily mixed, sometimes even on the same line. This can cause some headache and confusion for people reading patch files or inspecting commits in the Git web view.

I think we should therefore consider enabling the "Correct indentation" clean-up for Java and also add it as a save action.

What do others think? Do you have bad experiences using this specific clean-up?
Comment 1 Moritz Eysholdt CLA 2010-10-05 16:33:13 EDT
how about...
1. configuring the java formatter so that it produces acceptable results for as may scenarios as possible.
2. enable comment-based on/off tags for the formatter as described here: http://download.eclipse.org/eclipse/downloads/drops/R-3.6-201006080911/eclipse-news-part2.html#JavaFormatter This allows to disable the formatter locally for certain regions of the code.
3. use the on/off-tags to disable the formatter for places where it messes up the code.
4. commit the formatting config to git
5. run the formatter on all files

After doing this one could always run the formatter on a complete file without worrying about messing up some someone else's formatting an producing a noisy git-changeset.
Comment 2 Sven Efftinge CLA 2010-10-06 03:01:59 EDT
I think we need to try in order to find out.
Comment 3 Karsten Thoms CLA 2017-07-11 14:26:48 EDT
Closing due to inactivity. Although homogenous formatting is desirable this would mess up quite a lot of code.
Moving to backlog.