Pyflakes pre-commit hook in subversion

2008-01-09 Thread mobiledreamers
http://tarekziade.wordpress.com/2006/11/01/protecting-a-python-svn-code-base-with-the-pre-commit-hook/

Is it possible to check code in python before committing to svn

using pyflakes, pythontidy

*Pyflakes and Subversion*

Pyflakes  is a nice little utility
that checks your Python code for errors. The main advantage over PyChecker
and PyLint is that it is much faster and gives almost no false positives.
Today I wrote a little hack on top of the
enforcerpre-commit
script which forces the code you check in to pass pyflakes. Eg,
the users of svn will see the following output if they try to check in code
which has errors pyflakes can detect:

$ svn ci -m "fix" completion.py
Sendingcompletion.py
Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
Pyflakes found 1 error(s)/warning(s):
kiwi/trunk/examples/completion.py:1: undefined name 'test'

The small "configuration" file for enforce can be found
here.

Can you share enforcer file? or a means to ensure safe code in python repo
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] Pyflakes pre-commit hook in subversion

2008-01-08 Thread mobiledreamers
yes the link is broken and hence i sent it in
since it is a conf file for svn pre-commit hook
so pyflakes is run of your tree and it emits an error if python files have
any error preventing bad commits poisoning svn tree so dev can fix the bug
and recommit

On Jan 8, 2008 8:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:

> Mark wrote:
>
> > The small "configuration" file for enforce can be found here
> > 
> >.
>
> That link is broken.
> >
> > Can you share enforcer file? or a means to ensure safe code in python
> repo
>
> I don't understand what you are asking.
>
> Kent
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Pyflakes pre-commit hook in subversion

2008-01-08 Thread Mark





http://tarekziade.wordpress.com/2006/11/01/protecting-a-python-svn-code-base-with-the-pre-commit-hook/


Is it possible to check code in python before committing to svn
 
using pyflakes, pythontidy

Pyflakes and Subversion 
Pyflakes is a
nice little utility that checks your Python code for errors. The main
advantage over PyChecker and PyLint is that it is much faster and gives
almost no false positives. Today I wrote a little hack on top of the enforcer
pre-commit script which forces the code you check in to pass pyflakes.
Eg, the users of svn will see the following output if they try to check
in code which has errors pyflakes can detect: 
$ svn ci -m "fix" completion.py
Sendingcompletion.py
Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
Pyflakes found 1 error(s)/warning(s):

kiwi/trunk/examples/completion.py:1: undefined name 'test'

The small "configuration" file for enforce can be found here.

Can you share enforcer file? or a means to ensure safe code in python
repo



-- 
http://mail.python.org/mailman/listinfo/python-list