[Goodies-dev] 1 tab, 2 spaces or 4 spaces ?

Landry Breuil landry.breuil at gmail.com
Mon Oct 9 08:04:05 CEST 2006


2006/10/8, Juju <jujucece at gmail.com>:
>
> Hi,
>
> I try to clean the code of the genmon plugin, and I want to uniform
> the indentation of the code.
>
> Actually, there's part of the code with 1 tab indentation, other lines
> with 2 spaces and the most with 4 spaces.
>
> My question is quite simple, what should I do ?
> Is there a coding convention for this type of syntax "details" ?


There are lots of 'conventions', and i'm not aware of a particular
convention for xfce, neither in goodies or core-apps.
A good starting point may be to use GNU indent, which is _very_ helpful for
this kind of thigs :) !

Personnally, i indent with tabs and slightly modified BSD/allman-coding
style : http://en.wikipedia.org/wiki/Indent_style#BSD.2FAllman_style

indent -orig -npsl -nbc -di1 -bl -nce -bli0 -nsob -cp0 -c0 -ts4 -lc130 -l130


I know, it will make a huge amount of diff in svn for almost nothing,
> but it will make the code more clear and easier to improve !
>
> Thanks in advance...
>
> Juju
>
> PS : Personally, I prefer 2 spaces, but I'll follow the convention...
> if it exists ;-)


As this is mostly 'your code', you should follow your preferences for
indentation...

Landry

Ps : if there IS a convention for xfce-related apps, why not having a common
indent-commandline written somewhere in the developer docs ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20061009/6cab4a2f/attachment.html>


More information about the Goodies-dev mailing list