Benoit Boissinot <benoit.boissinot@ens-lyon.org> [Wed, 17 Mar 2010 14:15:33 +0100] rev 10722
check-code: improve quote detection regexp, add tests
Martin Geisler <mg@lazybytes.net> [Wed, 17 Mar 2010 10:55:28 +0100] rev 10721
Merge with stable
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 17 Mar 2010 10:51:26 +0100] rev 10720
check-code: add a return value to checkfile function
The checkfile function returns True if the file is correct, False
otherwise.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Mar 2010 19:53:00 +0100] rev 10719
code-code: Add a logfunc argument to checkfile
This helps external tool customisation. The logfunc argument must be a
function called to report errors. A new logger class is also added to
keep the old behaviour by default.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Mar 2010 19:52:58 +0100] rev 10718
check-code: Add a ``maxerr`` argument to the ``checkfile`` function
check-code.py used to halt after 15 errors. This changeset adds a new
argument to the checkfile function to control this limit.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Mar 2010 19:52:57 +0100] rev 10717
check-code: Add a ``checkfile`` function
The part of the code actually checking each file is moved in the
``checkfile`` function to allow external reuses.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Mar 2010 19:52:56 +0100] rev 10716
check-code: Only call check-code if __name__ = "__main__".
This changeset moves the code that actually executes something to the
"if __name__ = '__main__'" section to allow the file to be imported as
a module.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 16 Mar 2010 19:52:55 +0100] rev 10715
add a small test for contrib/check-code.py
This changeset adds a test file for contrib/check-code.py. This test runs
check-code.py against two small files. The first file should not raise any
check-code.py error while the second should. A line contains multiple errors to
verify the check-code.py behaviour: In the case of multiple errors at the same
line, the context line should only be displayed once.