[Koha-devel] code formatting (was: [Koha-patches] [PATCH] Bug 2176: adding SMS::Send to list of dependencies)

Andrew Moore andrew.moore at liblime.com
Mon Jun 23 15:17:00 CEST 2008


Hi MJ -

On Mon, Jun 23, 2008 at 4:18 AM, MJ Ray <mjr at phonecoop.coop> wrote:
>> > Why does this patch covertly reindent everything?
>>
>> I didn't intend for it to be covert. [...]
>
> OK.  Please try to mention these things in comments.  It'd be a bit of
> a pain to cherry-pick a patch described as "adding SMS::Send ..." and
> have the dep's rewritten without warning.

Alright. If it helps you out, I'll add a comment about this to my
growing commit template.

I have started to try to bundle refactoring patches into a separate
patch before functionality. I'll try to be a little more liberal on
deciding what kinds of whitespace changes to pull out into a separate
patch.

>> I'd really like to be able to use perltidy to make the code that I
>> edit and contribute more readable. Is there a particular indentation
>> style that you think would be good to use on code that I change in
>> Koha? I couldn't find much about this on the wiki.
>
> If my notes from 1.9 are accurate, we used to use
>  perltidy -bar -ce -pt=2 -vt=2 -en=4
> which is almost what is in the perlstyle manual, except cuddled elses.
> However, it's not been enforced much and "more readable" depends on
> what you're using to read it...

Super, a step towards consensus!

I've opened up bug 2269 to add a perltidyrc file with these options
and will work to follow it.
<http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2269>

> The wiki really isn't in good shape and I find it too much of a pain
> to edit.  Searching the mailing list and IRC is usually more useful.
> Should we create a HACKING file (which is what I think GNU software
> calls the file) with the above sort of info in it?

I agree that the wiki is tough to edit. I'm struggling to grow used to
it, too. But, I think it could be a valuable resource, so I'm
personally hesitant to abandon it. I was actually considering adding a
"contributors checklist" or something similar on the wiki today. I
think a HACKING file would be a great contribution, too. Perhaps you
could also include some information about how to make your code
translatable, too. That's an area that I'm struggling to find
documentation on.

Thanks!
-Andy
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-devel



More information about the Koha-devel mailing list