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 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. 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, 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. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
