[Koha-devel] tt style point

Mason James mtj at kohaaloha.com
Tue Sep 20 04:33:30 CEST 2011


On 2011-09-19, at 8:09 PM, LAURENT Henri-Damien wrote:

> Le 19/09/2011 04:06, Mason James a écrit :
>> i too, sure would love to get an agreement on a consistent, mechanised formatting style for perl code in Koha
>> fyi: Koha's current .perltidyrc was never agreed upon, it was simply submitted and accepted 
> As far as I know, it has never been enforced though.

yes, its never been agreed upon or enforced - it was just a thoughtful suggestion from Andrew

> And enforcing that globally would make it a pain in the neck for all
> developpers and maintainers rebasing their features.

i'm not suggesting existing code will be rejected if its not formatted to the new perltidy style, thats too painful!!

i simply suggest we start the process by agreeing on a standard, and go from there...


> Unless it is
> planned, announced widely, and done when every ppl agree, I think that
> perltidyrc would be just an idle file.


the current perltidyrc file *is* just an idle file, because it was never agreed upon...

lets agree on a formatting style, and make the spec official. then it wont be just an idle file :)


> I once did that on our repository. It made it much harder to port
> features and code back into the trunk. So I would love that.

again... i'm not suggesting that we force people to perltidy their old code


> Maybe it could be discussed and done just before splitting branches for
> stable branch. Therefore, the maintainer and the new master would have
> the same "coding standard"
> It could also THEN be invoked as a git hook on edited files so that they
> would not loose their tidyness.

yep, those are both great ideas :)


i'm strongly against having old code 'perltidy-fied' in huge commits, because i know the problems that causes with tools like 'git-blame', etc

so i suggest we slowly and gently correct small blocks of existing code - as we work on it
and the formatting in new Koha releases will start to become more consistent

i personally don't mind *what* that standard is... i just want an agreed upon standard
but hey... --PBP get my vote by a mile!


cheers, Mason


More information about the Koha-devel mailing list