[Bioperl-l] added a perltidy profile file

Chris Fields cjfields at illinois.edu
Mon Aug 24 12:56:02 UTC 2009


Heikki,

perltidy has become the most common way to standardize perl coding  
style (in a non-text-editor-dependent way).  A number of projects have  
started using it as a means for checking and cleaning up modules prior  
to release.  I think Perl Best Practices reinforced that.

chris

On Aug 24, 2009, at 12:59 AM, Heikki Lehvaslaiho wrote:

> De facto coding style standard for BioPerl has been emacs using cperl
> mode and bioperl.list file. As long as this configuration does not
> change the conventions used, I see this as great way in helping to
> format code from other editors.
>
>
>   -Heikki
>
> 2009/8/23 Hilmar Lapp <hlapp at gmx.net>:
>> Consistent coding style is in principle a good thing.
>>
>> It's also worth to keep in mind one of the old BioPerl principles -  
>> don't
>> change working code purely to change style. In my interpretation of  
>> the
>> rule, however, this has always applied to code writing style, and  
>> not code
>> formatting style. I'm assuming the goal here is only to make the  
>> formatting
>> consistent.
>>
>>        -hilmar
>>
>> On Aug 21, 2009, at 5:55 PM, Dan Bolser wrote:
>>
>>> Cheers Rob,
>>>
>>> Whatever objectons may arise from style x or style y, I think it's a
>>> great idea to at least have one style or another recognized as being
>>> 'standard'. I know TMTOWTDI, but on a project like this, with so  
>>> many
>>> contributors and users, it's essential to at least have a
>>> recommendation. I'll try to use this on any contribs.
>>>
>>> As you pointed out [1], its probably best to provide two patches for
>>> any change involving a formating clean up: one to change the fomat  
>>> to
>>> the standard and one to commit the actual code changes.
>>>
>>>
>>> All the best,
>>> Dan.
>>>
>>> [1] irc://irc.freenode.net/#bioperl
>>>
>>>
>>> 2009/8/21 Robert Buels <rmb32 at cornell.edu>:
>>>>
>>>> This one is copied from the parrot project.  I added it in
>>>> maintenance/perltidy.conf.
>>>> Have a look, tweak as you see fit.
>>>>
>>>> The idea with perltidy profile files is to use them to enforce  
>>>> coding
>>>> style
>>>> rules.  So this perltidy profile file would be the place to  
>>>> codify the
>>>> BioPerl coding standards, such as indentation, use of cuddled  
>>>> elses, etc.
>>>>
>>>> So here is one, let's customize it for our needs.  The way I  
>>>> usually run
>>>> perltidy is with -b to modify a file in-place, and with the '-pro='
>>>> option
>>>> to specify a profile file.
>>>>
>>>> Example:
>>>>  perltidy -b -pro=maintenance/perltidy.conf Bio/SimpleAlign.pm
>>>>
>>>> Rob
>>>>
>>>> --
>>>> Robert Buels
>>>> Bioinformatics Analyst, Sol Genomics Network
>>>> Boyce Thompson Institute for Plant Research
>>>> Tower Rd
>>>> Ithaca, NY  14853
>>>> Tel: 503-889-8539
>>>> rmb32 at cornell.edu
>>>> http://www.sgn.cornell.edu
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>>
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>> --
>> ===========================================================
>> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
>> ===========================================================
>>
>>
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>
>
>
> -- 
>     -Heikki
>
> Heikki Lehvaslaiho - skype:heikki_lehvaslaiho
> cell: +966 545 595 849  office: +966 2 808 2429
> Building #2, Office #4216
> Computational Bioscience Research Centre (CBRC)
> 4700 King Abdullah University of Science and Technology (KAUST)
> Thuwal 23955-6900, Kingdom of Saudi Arabia
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list