[pkg] Add flake8 tox configuration
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 19 Jan 2017 12:31:09 +0100
changeset 64 29eb8d663df3
parent 63 2f055b10dbce
child 65 b6d714abd494
[pkg] Add flake8 tox configuration
__pkginfo__.py
tox.ini
--- a/__pkginfo__.py	Fri Feb 03 14:24:40 2017 +0100
+++ b/__pkginfo__.py	Thu Jan 19 12:31:09 2017 +0100
@@ -44,6 +44,7 @@
             and not fname.endswith('~')
             and not isdir(join(dirpath, fname))]
 
+
 data_files = [
     # common files
     [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tox.ini	Thu Jan 19 12:31:09 2017 +0100
@@ -0,0 +1,28 @@
+[tox]
+envlist = flake8
+
+[tox:jenkins]
+envlist = flake8-jenkins
+
+[testenv:flake8]
+skip_install = true
+whitelist_externals =
+  flake8
+deps =
+  flake8
+commands = flake8 {posargs:{toxinidir}}
+
+[testenv:flake8-jenkins]
+skip_install = true
+whitelist_externals =
+  flake8
+deps =
+  flake8
+commands = flake8 --exit-zero --show-source --output-file=code_quality.log {toxinidir}
+
+[flake8]
+format = pylint
+ignore = W503
+max-line-length = 100
+max-complexity = 12
+exclude = setup.py,doc/conf.py,migration/*,.tox/*