Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: No Hard Tabs in Code

by Anonymous Monk
on Nov 25, 2010 at 06:03 UTC ( #873581=note: print w/replies, xml ) Need Help??

in reply to Re: No Hard Tabs in Code
in thread No Hard Tabs in Code

I have two .perltidyrc files.

One contains just this line:

The other contains various heretical statements such as
-i=3 # Indent level is 3 cols -et=3 # Use tabs for indents because I'm such a sociopath -ci=3 # Continuation indent is 3 cols -icb # Make closing braces align with the body of their block

As I'm editing code, I'll run perltidy over it with my preference for formatting. Before checking code back in, I'll run perltidy with the Perl Best Practices formatting, run ./Build test and commit.

I, too, draw a distinction between "indenting" and "alignment". I, too, program in languages other than Perl (such as Ruby, Python and PHP).

I also edit using a proportional font (DejaVu Sans is my current favourite), which renders any attempts at "alignment" futile. I cannot stand the practice of sticking in extra spaces to make the '=' symbols line up.

The perltidy tool lets me slip in under the radar of contemporary society.

Replies are listed 'Best First'.
Re^3: No Hard Tabs in Code (perltidy)
by tye (Sage) on Nov 25, 2010 at 23:37 UTC

    Until you run into constructs that perltidy misformats. Then your coworkers will eventually wonder, every time they fix the use of & to override a prototype and then you touch unrelated code in the same source file, why the space gets re-inserted stupidly...

    Do you at least look at the differences you are introducing before you finish checking in? Probably not. Probably making merge conflicts significantly worse plenty of times as well.

    - tye        

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://873581]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2021-10-20 20:41 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (82 votes). Check out past polls.