[Surfraw-devel] Surfraw Style Guide RFC (was whitespace errors)
Jason Ryan
jasonwryan at gmail.com
Sat Oct 11 05:36:20 UTC 2014
On 05/10/14 at 06:31pm, Jason Ryan wrote:
> On 05/10/14 at 07:16am, Lucas Hoffmann wrote:
> >Is there any style (guide?) set up for surfraw? The HACKING file says
> >>You must call w3_global_usage at the end of this function and follow
> >>the surfraw usage style least you be marked a quiche eater.
> >But I'm not sure if that is meant for any general style.
> >
> Not that I am aware of; but we could certainly kick one off with this
> discussion.
>
> My preferences would be:
>
> >What I have seen:
> >* different leading whitespace (4 spaces or tabs)
> Non-committal but I think that tabs currently outweigh spaces
>
> >* different process substitutions ( `` or $() )
> Should use $(), it is *much* more legible
>
> >* variables in functions declared local and not declared local
> Declare local
>
> >* initializing variables to the empty string with var= and var=""
> The latter
>
> >* long lines
> Aim for 80, where reasonable
>
> >* if ... then and for ... do on the same line and in different lines
> Different lines
>
> What do others think about a agreeing a style guide and then tidying up the code
> to conform to it (if only so people don't have to wear the stigma of being a
> quiche eater)?
>
Any further suggestions? Or should I just write this up and it can be added to
as and when it is needed?
/J
--
http://jasonwryan.com/ [GnuPG Key: B1BD4E40]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/surfraw-devel/attachments/20141011/abddee61/attachment.sig>
More information about the Surfraw-devel
mailing list