| Summary: | [LTTng] Tabs and spaces mixed in source code | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Francis Giraldeau <francis.giraldeau> |
| Component: | LinuxTools | Assignee: | Alexandre Montplaisir <alexmonthy> |
| Status: | CLOSED FIXED | QA Contact: | Francois Chouinard <fchouinard> |
| Severity: | trivial | ||
| Priority: | P3 | CC: | overholt, patrick.tasse |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Francis Giraldeau
Linux Tools has never standardized. If this is important, we can set one up and have one big commit that fixes everything. We can also set save hooks to auto-format on save. 1. Tabs Spaces don't lie. As far as I'm concerned, tabs should be strictly forbidden. I don't think there's been a half-decent case for them since data communication broke the 10cps barrier. IMHO, their nuisance far outweighs their presumed usefulness (we will see "Peace in the Middle East" AND "Cure for Cancer" before I change my mind on this one :-) 2. Big commit I was thinking of going tab-less right after 0.8.1 (LTTng/TMF only). I'm not convinced the other sub-projects want to spend any time on this... 3. Auto-format I used "format on save" hooks in the Bad Old ClearCase days and it was neat. But I'm not aware of such hooks in Eclipse. How does that work? (In reply to comment #2) > 2. Big commit > > I was thinking of going tab-less right after 0.8.1 (LTTng/TMF only). I'm not > convinced the other sub-projects want to spend any time on this... I'm not aware of anyone caring outside of LTTng/TMF, either. But I'm sure people wouldn't complain if this were done for all sub-projects > 3. Auto-format > > I used "format on save" hooks in the Bad Old ClearCase days and it was neat. > But I'm not aware of such hooks in Eclipse. How does that work? Ctrl-3 "save actions" -> "Save Actions - Java/Editor". Check "Perform the selected actions on save" and check the "Format source code" box. > Ctrl-3 "save actions" -> "Save Actions - Java/Editor". Check "Perform the
> selected actions on save" and check the "Format source code" box.
Thanks for the tip! Ctrl-3 didn't work but setting the pref (Java > Editor > Save Actions) was just as good.
Ctrl-awesome ( ;) ) didn't work? I didn't see "save actions" in the popup and didn't realize I had to type it in... My bad :-) (It is actually awesome :-) Postponed to after Juno. Project settings have been added with space-only tab formatting. https://git.eclipse.org/r/6905 Pushed to master branch commit 62c12f61298de942ca9465d0b482d490fe3f7bef Released in 1.2. |