Previously Tarek Ziadé wrote:
> 
> 
> wichert wrote:
> > 
> > Can you create a ticket on dev.plone.org/plone.org with the script as
> > attachment?
> > 
> 
> done: https://dev.plone.org/plone.org/ticket/679
> 
> note that this will have a pitfall: since the existing code is not "clean"
> someone who checks out, won't be able to commit a change until he cleans 
> everything he checks, so it can be quiote annoying.

You can easily check for that though: instead of looking at whole files
only look at the inserted lines in a diff. We already extract that diff
to look for pdb.set_trace statements so this is simple to add.

> Maybe we should run a cleaner on the whole repo itself before hooking
> it.

-10

I want to be very careful here: the collective contains lots of code
from lots of people and we do not own any of it. People should be free
to have code that uses tabs for indenting or any other convention that
they prefer. Doing large changes over the entire collective will have
very little benefit and may result in a lot of conflicts when people
try to update or commit their code.

What we should be looking for is things that we know will always break
code. A pdb.set_trace() in code is an example, as is mixing different
eol-styles. 

I intend to use your script as inspiration for improvements of the
existing pre-commit hook we already have. 

Wichert.


-- 
Wichert Akkerman <[EMAIL PROTECTED]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to