add flake8 config and enable in travis

This commit is contained in:
undeath 2018-08-20 12:45:08 +02:00
parent 36c3fd9c57
commit 9d72573de2
3 changed files with 23 additions and 1 deletions

View file

@ -50,6 +50,7 @@ before_script:
script:
- on_host do_on linux bitcoind --help | head -1
- on_host do_on linux ./test/run_tests.sh
- on_host do_on linux flake8 jmbase jmbitcoin jmclient jmdaemon scripts test
- on_docker ./test/Dockerfiles/build_docker.sh
after_success:
- on_docker echo "Success !"

View file

@ -6,4 +6,4 @@ pytest
pytest-cov
python-coveralls
mock
flake8

View file

@ -1,3 +1,24 @@
# content of pytest.ini
[tool:pytest]
testpaths = jmbitcoin jmclient jmbase jmdaemon test
[flake8]
exclude =
# defaults
.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,
# lots of "unused imports"
__init__.py,
# unmaintained
jmclient/jmclient/slowaes.py
# default value, keep?
max-line-length = 79
statistics = True
max-complexity = 15
# should be extended once existing issues are fixed
select = F,E9,W6
# those cause many errors, need to be fixed eventually
ignore = F403,F405,F841