• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5301: Don't use tab whitespace in core code

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 4.2.1, 5.0.0

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


To all core developers: please configure your editors not to use tabs anymore.

-- TWiki:Main/MichaelDaum - 30 Jan 2008

I like tabs. always have. (worse is that I use lots of different editors, on lots of different computers, and just leave them set to their defulats)

of course, all that has meant is that I have learnt to not notice whitespace issues much.

What if we run perltidy on the code, and call that the norm?

-- TWiki:Main.SvenDowideit - 30 Jan 2008

seems the changes you made to TWiki/Users.pm broke on AllOutStandingItem - so I reverted and ran perl tidy.

-- TWiki:Main.SvenDowideit - 31 Jan 2008

The use of perltidy has been discussed before, conclusion was that it is not a workable solution.

-- TWiki:Main.SteffenPoulsen - 31 Jan 2008

really? I didn't find it in the Codev topics I found today.. go-on gimme a link.

the only thing I found was http://twiki.org/cgi-bin/view/Codev/PerlTidy , http://twiki.org/cgi-bin/view/Codev/CodingStandards and similar - all of which are positive, or inconclusive. Comparing a manual, last commiters style wins to an automated tool, I fail to see how it would be worse.

-- TWiki:Main.SvenDowideit - 31 Jan 2008

All I am asking for is to please take care of your coding standards. Using perltidy is no replacement for a clean way of writing and formatting code. Tabs are simply not fool-proof. And so I tidied it up while reading your code. I just changed whitespaces made changes to code that was bogus obviously. What exactly broke? Anyway to tell now?

-- TWiki:Main.MichaelDaum - 31 Jan 2008

The subject was brought up a number of times a few years ago when Meredith Lesly helpfully tidyed up lots of our TWiki core code in several ways (when she was working in one of the many Csa/Drusilla branches).

You are probably right that there is no mention in Codev, there should be some in IRC though (can't reach search right now, so only guessing).

But anyway, let's get this more specific so we know what to take a stand to:

  • Which parameters and which perltidy version do you suggest we use? (defaults vary between distributions and perltidy versions).
  • Any early results? I.e. how does an initial run affect current unit test state?

Checkins like TWikirev:16325 are unlucky and not helping your case - why did simple whitespace changes make things break? We are left with the puzzle right now.

-- TWiki:Main.SteffenPoulsen - 31 Jan 2008

personally, I think that perltidy has more chance of not changing the code than any human going through converting the style to their interpretation of the standard.

I used the default settings of debian etch's perl tidy (at the time :/ ) and then ran the unit tests happily - but I think the breakage Micha caused wasn't caught by the unit tests either.

If you (or heck anyone else) want to track down what caused it, it should be a pretty simple matter of going back using svn - it should be done, and unit tests written.

I don't think that it was 'simple whitespace changes' Micha's commit mixed whitespace changes with code changes - and that is (to me) another strong reason to use automated tools - no temptation to also make manual changes in the same commit.

-- TWiki:Main.SvenDowideit - 31 Mar 2008

Micha your commit mixed whitespace changes with code changes

closing, as its not a SMART enough issue to leave open for ever - none-the-less we should all including me be not using tabs.

-- SvenDowideit - 25 Jun 2008

Summary Don't use tab whitespace in core code
ReportedBy TWiki:Main.MichaelDaum
Codebase ~twiki4
SVN Range TWiki-5.0.0, Wed, 23 Jan 2008, build 16283
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:16309 TWikirev:16310 TWikirev:16311 TWikirev:16312 TWikirev:16313 TWikirev:16325 TWikirev:16326
TargetRelease patch
ReleasedIn 4.2.1, 5.0.0
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2008-07-26 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback