tox.ini
changeset 11474 28311db7a2a5
parent 11465 10ecd586a9a8
child 11475 d2fcd81b7ca9
--- a/tox.ini	Thu Sep 15 21:22:53 2016 +0200
+++ b/tox.ini	Fri Sep 23 09:50:16 2016 +0200
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-  check-manifest,
+  check-manifest,flake8,
   py27-{cubicweb,dataimport,devtools,entities,etwist,ext,hooks,server,migractions,sobjects,web,wsgi},
   py34-{cubicweb,dataimport,devtools,entities,ext,hooks,server,migractions,sobjects,web,wsgi}
 
@@ -41,6 +41,12 @@
   web: {envpython} -m pytest {toxinidir}/cubicweb/web/test {posargs}
   wsgi: {envpython} -m pytest {toxinidir}/cubicweb/wsgi/test {posargs}
 
+[testenv:flake8]
+skip_install = true
+deps =
+  flake8 >= 3
+commands = flake8 {posargs:{toxinidir}}
+
 [testenv:doc]
 changedir = doc
 deps =
@@ -60,3 +66,92 @@
 
 [pytest]
 python_files = *test_*.py
+
+[flake8]
+format = pylint
+ignore = W503
+max-line-length = 100
+exclude = setup.py,doc/*,cubicweb/misc/*,cubicweb/test/*,cubicweb/*/test/*,.tox/*
+filename=
+  cubicweb/dataimport/csv.py,
+  cubicweb/dataimport/importer.py,
+  cubicweb/dataimport/massive_store.py,
+  cubicweb/dataimport/stores.py,
+  cubicweb/dataimport/test/data-massimport/schema.py,
+  cubicweb/dataimport/test/data/schema.py,
+  cubicweb/dataimport/test/test_csv.py,
+  cubicweb/dataimport/test/test_pgstore.py,
+  cubicweb/dataimport/test/test_stores.py,
+  cubicweb/dataimport/test/unittest_importer.py,
+  cubicweb/devtools/test/data/cubes/i18ntestcube/__init__.py,
+  cubicweb/devtools/test/data/cubes/__init__.py,
+  cubicweb/devtools/test/data/schema.py,
+  cubicweb/devtools/testlib.py,
+  cubicweb/devtools/test/unittest_devctl.py,
+  cubicweb/devtools/test/unittest_i18n.py,
+  cubicweb/devtools/test/unittest_webtest.py,
+  cubicweb/devtools/webtest.py,
+  cubicweb/entities/adapters.py,
+  cubicweb/entities/test/unittest_base.py,
+  cubicweb/etwist/__init__.py,
+  cubicweb/ext/__init__.py,
+  cubicweb/hooks/test/data/hooks.py,
+  cubicweb/hooks/test/unittest_notification.py,
+  cubicweb/hooks/test/unittest_security.py,
+  cubicweb/hooks/test/unittest_syncsession.py,
+  cubicweb/__init__.py,
+  cubicweb/__main__.py,
+  cubicweb/pylintext.py,
+  cubicweb/server/repository.py,
+  cubicweb/server/schema2sql.py,
+  cubicweb/server/session.py,
+  cubicweb/server/sqlutils.py,
+  cubicweb/server/test/datacomputed/migratedapp/schema.py,
+  cubicweb/server/test/datacomputed/schema.py,
+  cubicweb/server/test/data/entities.py,
+  cubicweb/server/test/data-migractions/cubes/fakecustomtype/__init__.py,
+  cubicweb/server/test/data-migractions/cubes/fakeemail/__init__.py,
+  cubicweb/server/test/data-migractions/cubes/__init__.py,
+  cubicweb/server/test/data-migractions/migratedapp/__init__.py,
+  cubicweb/server/test/data-schema2sql/__init__.py,
+  cubicweb/server/test/unittest_checkintegrity.py,
+  cubicweb/server/test/unittest_ldapsource.py,
+  cubicweb/skeleton/test/pytestconf.py,
+  cubicweb/sobjects/test/unittest_notification.py,
+  cubicweb/sobjects/test/unittest_register_user.py,
+  cubicweb/sobjects/textparsers.py,
+  cubicweb/test/data/cubes/comment/__init__.py,
+  cubicweb/test/data/cubes/comment/__pkginfo__.py,
+  cubicweb/test/data/cubes/email/entities.py,
+  cubicweb/test/data/cubes/email/hooks.py,
+  cubicweb/test/data/cubes/email/__init__.py,
+  cubicweb/test/data/cubes/email/__pkginfo__.py,
+  cubicweb/test/data/cubes/email/views/__init__.py,
+  cubicweb/test/data/cubes/file/entities/__init__.py,
+  cubicweb/test/data/cubes/file/hooks/__init__.py,
+  cubicweb/test/data/cubes/file/__init__.py,
+  cubicweb/test/data/cubes/file/__pkginfo__.py,
+  cubicweb/test/data/cubes/file/views.py,
+  cubicweb/test/data/cubes/forge/__init__.py,
+  cubicweb/test/data/cubes/forge/__pkginfo__.py,
+  cubicweb/test/data/cubes/mycube/__init__.py,
+  cubicweb/test/data/cubes/mycube/__pkginfo__.py,
+  cubicweb/test/data/migration/0.1.0_common.py,
+  cubicweb/test/data/migration/0.1.0_repository.py,
+  cubicweb/test/data_schemareader/schema.py,
+  cubicweb/test/data/server_migration/bootstrapmigration_repository.py,
+  cubicweb/test/data/views.py,
+  cubicweb/test/unittest_binary.py,
+  cubicweb/test/unittest_mail.py,
+  cubicweb/test/unittest_repoapi.py,
+  cubicweb/test/unittest_schema.py,
+  cubicweb/test/unittest_toolsutils.py,
+  cubicweb/web/formwidgets.py,
+  cubicweb/web/test/data/entities.py,
+  cubicweb/web/test/unittest_http_headers.py,
+  cubicweb/web/test/unittest_views_basetemplates.py,
+  cubicweb/web/test/unittest_views_cwsources.py,
+  cubicweb/web/test/unittest_views_json.py,
+  cubicweb/web/views/json.py,
+  cubicweb/web/views/searchrestriction.py,
+  cubicweb/xy.py,