Re: [Koha-devel] tt style point
reply inline On 2011-09-20, at 8:17 PM, LAURENT Henri-Damien wrote:
Le 20/09/2011 04:33, Mason James a écrit :
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...
it is always the same question : who will decide
we can decide now the koha-devel mailing-list, or as a topic for the next Koha IRC meeting
and who will process the files ?
not sure on that bit yet :p , lets agree on a Perl style standard first, then decide who/how/when later
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 :) When ? some things has already been committed. And things donot get improved.
when should we agree on a formatting style,? how about now...
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
I am not. git blame may be useful, but code readability is a much serious issue. I think that some decision should be not only discussed but also taken, announced and applied.
ah, ok that would be the next thing to discuss, after we all voted on a Perl formatting style :)
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
How can you enforce PBP or any formatting on part of a file ?
its easy using vim!, and surely possible for all other respectable editors
If previous file indentation is broken, you will just add broken things.
nope, perltidy corrects the indentation perfectly, without any syntax errors
If there is some magic I don't know please tell me.
yes, there is some magic :) i added this to my .vimrc file, now F4 tidys a selected block of text :) fyi: i use this method many times a day ---------------------------------------- map <F4> <Esc>:%! perltidy<CR> ---------------------------------------- described here... http://www.modernperlbooks.com/mt/2009/10/from-novice-to-adept-cleaning-up-b... i very rarely run perltidy on a whole Koha file, instead i run it *carefully* on small blocks of messy historical Koha code as i see them
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!
I don't know what ranty mean.
"To speak agressivly about somthing. or to take your own tangent about a subject and talk for a long time in a passionate manner" :) http://www.urbandictionary.com/define.php?term=rant
But don't be mistaken, all I want is a change for better. The fact is that ppl are working on the same code ignoring what other ppl are doing. And with the need to revamp more and more things for security, sustainability and performance issues. I think that it should be shared, discussed, stated, worked in groups and done.
yes... but thats a separate issue to what Perl formatting style to use for Koha so remember, there's a few who/when/how issues to discuss here... but can we at least agree on a Perl formatting style, for a start -PBP++ ;) cheers, Mason
Op dinsdag 20-09-2011 om 23:40 uur [tijdzone +1200], schreef Mason James:
i added this to my .vimrc file, now F4 tidys a selected block of text :) fyi: i use this method many times a day
---------------------------------------- map <F4> <Esc>:%! perltidy<CR> ----------------------------------------
Nifty. I've improved on this slightly: " Allow easy running of perltidy, bound to F6 nnoremap <F6> <Esc>:%! perltidy -q<CR> vnoremap <F6> <Esc>:'<,'> ! perltidy -q<CR> this allows you to apply it to parts of the file using visual mode, or the whole thing if you're not in visual mode. -q is good to stop it doing syntax checks and outputting other things that may mess up your editor display (or maybe the content of the file itself when it goes through the filter, not sure.) -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
Le 20/09/2011 13:40, Mason James a écrit :
it is always the same question : who will decide we can decide now the koha-devel mailing-list, or as a topic for the next Koha IRC meeting
i've added the topic for the next IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_October_2011#Agen... HTH -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
On 2011-09-28, at 10:26 PM, Paul Poulain wrote:
Le 20/09/2011 13:40, Mason James a écrit :
it is always the same question : who will decide we can decide now the koha-devel mailing-list, or as a topic for the next Koha IRC meeting
i've added the topic for the next IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_October_2011#Agen...
thanks Paul, thats great! fyi: i've updated the 5th-Oct irc-meeting wiki entry with some examples for the suggested perltidy styles... http://git.kohaaloha.com/?p=koha-perltidy/.git;a=commit;h=HEAD i'm really hoping for vote on this issue, see you all at the irc-meeting on the 5th-Oct ;) cheers, Mason -- KohaAloha, NZ
participants (3)
-
Mason James -
Paul Poulain -
Robin Sheat