/ tox.ini
tox.ini
1 [tox] 2 envlist = config,flake8,bashate 3 skipsdist = True 4 5 [testenv] 6 whitelist_externals = 7 bash 8 9 [testenv:config] 10 commands = 11 /bin/bash -c 'set -euo pipefail && . ./conf/production.env.example' 12 /bin/bash -c 'set -euo pipefail && . ./conf/development.env.example' 13 14 [testenv:bashate] 15 deps = bashate==0.5.1 16 commands = 17 # Run bashate check for all bash scripts 18 # Ignores the following rules: 19 # E003: Indent not multiple of 4 (we use multiples of 2) 20 # E006: Line longer than 79 columns 21 bash -c "grep --recursive --binary-files=without-match \ 22 --files-with-match '^.!.*\(ba\)\?sh$' \ 23 --exclude-dir .tox \ 24 --exclude-dir .git \ 25 {toxinidir} | xargs bashate --error . --verbose --ignore=E003,E006" 26 27 [testenv:flake8] 28 deps = 29 flake8 30 flake8-debugger 31 commands = flake8 {posargs} 32 33 [testenv:isort] 34 deps = isort==4.2.15 35 commands = 36 bash -c "find {toxinidir} \ 37 -type d \ 38 \( \ 39 -path {toxinidir}/.git -o \ 40 -path {toxinidir}/.tox -o \ 41 -path {toxinidir}/.venv -o \ 42 -path {toxinidir}/plugins -o \ 43 -path {toxinidir}/node_modules \ 44 \) -prune -o \ 45 -name '*.py' \ 46 -print | xargs isort {posargs:--check-only} --verbose" 47 48 [flake8] 49 exclude = .venv,venv,.tox,dist,doc,build,*.egg,docs,setup.py,*/migrations/ 50 ignore = E121,E123,E125,E126,E127,E128,E131,E222,E226,E231,E251,E261,E265,E302,E305,E402,E714,E722,F401,F403,F405,F841,W391,W605 51 max-line-length = 160 52 # E121 continuation line under-indented for hanging indent 53 # E123 closing bracket does not match indentation of opening bracket's line 54 # E125 continuation line with same indent as next logical line 55 # E126 continuation line over-indented for hanging indent 56 # E127 continuation line over-indented for visual indent 57 # E128 continuation line under-indented for visual indent 58 # E131 continuation line unaligned for hanging indent 59 # E222 multiple spaces after operator 60 # E226 missing whitespace around arithmetic operator 61 # E231 missing whitespace after 62 # E251 unexpected spaces around keyword / parameter equals 63 # E261 at least two spaces before inline comment 64 # E265 block comment should start with '# ' 65 # E302 expected 2 blank lines, found 1 66 # E305 expected 2 blank lines after class or function definition, found 1 67 # E402 module level import not at top of file 68 # E714 test for object identity should be 'is not' 69 # E722 do not use bare except 70 # F401 Imported but unused 71 # F403 'from module import *' used; unable to detect undefined names 72 # F405 foo may be undefined, or defined from star imports 73 # F841 local variable 'foo' is assigned to but never used 74 # W391 blank line at end of file 75 # W605 invalid escape sequence