El 06/02/15 a les 17:29, Cédric Krier ha escrit:
On 06 Feb 16:16, Sergi Almacellas Abellana wrote:
Hi,

As a PoC i just added flake8 check to tox [1] on one of my personal
projects. The output is available on drone [2].

I tought it my be interesting to have this check also on all tryton modules.
What do you think? .

Also this will allow to deprecate reviewbot once all codereviews are tested
on drone.

Note: Adding flake8 to tox, means fixing all errors (otherwise build will
fail on drone) which means:

adding # noqa to all __init__.py lines that import *
adding # noqa to all tests/__init__.py
Fix all possible errors.

I'm strongly against that.
flake8 is not the holly grail.
Also I'm against having build failure because flake8 thinks you did not
correctly indent something or you should write differently something.
Please re-read PEP-8, it is just a suggestion.


I don't like to add the coments also, so maybe we need to be more flexible on this files. Maybe ignoring __init__.py files and the identation error which is not well detected by pyflakes will do the rick.

I also managed to run coverage to ensure that module coverage is over a
specific % (75% on my case, but can be customized per module). Patch is
here[3] (and here[4] is run by default). The output is also available on
drone [5]. Do you think this is also interesting to add?

Only if it is output and the build will not fail because coverage is
lower.

It can be done without a problem, but i imagine this will be only noise.

But I also fear that it will just be noise and resource
consuming.
Also such constraint will lead to adding useless tests to increase the
coverage and thus making maintenance on tests more expensive.


For me this will prevent to add a lot of new more code that won't be tested. And that's my objective.

For me, quality is not achieve by tools but by the process/workflow used
(like codereview, bugtracking, non-regression test, documenation,
comments etc.). The tools like flake8 or coverage are only tools to help
to follow the process but they must not become the target otherwise we
miss the real point which is quality.



--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Reply via email to