b5c61d006c
The code has over 2000 warnings related to indentation and line length Suppressing these warnings allow us to fix those warnings in manageable code chunks In addition to suppressing many of the warnings, this submission fixes W191 indentation contains tabs W291 trailing whitespace W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file W503 line break before binary operator Change-Id: If40f73d7312aec574d8141ea1af2cc6f1b4b8a46
70 lines
2.3 KiB
INI
70 lines
2.3 KiB
INI
[tox]
|
|
envlist = linters
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:linters]
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs -0 bashate -v"
|
|
bash -c "find {toxinidir} \
|
|
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
|
|
-o \( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs -0 yamllint"
|
|
|
|
[pep8]
|
|
# Temporarily ignoring these warnings
|
|
# E101 indentation contains mixed spaces and tabs
|
|
# E116 unexpected indentation (comment)
|
|
# E121 continuation line under-indented for hanging indent
|
|
# E122 continuation line missing indentation or outdented
|
|
# E123 closing bracket does not match indentation of opening bracket
|
|
# E124 closing bracket does not match visual indentation
|
|
# E126 continuation line over-indented for hanging indent
|
|
# E127 continuation line over-indented for visual indent
|
|
# E128 continuation line under-indented for visual indent
|
|
# E129 visually indented line with same indent as next logical line
|
|
# E203 whitespace before ':'
|
|
# E211 whitespace before '('
|
|
# E225 missing whitespace around operator
|
|
# E226 missing whitespace around arithmetic operator
|
|
# E228 missing whitespace around modulo operator
|
|
# E231 missing whitespace after ':'
|
|
# E241 multiple spaces after
|
|
# E261 at least two spaces before inline comment
|
|
# E265 block comment should start with '# '
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
# E302 expected 2 blank lines, found 1
|
|
# E303 too many blank lines
|
|
# E501 line too long
|
|
# E712 comparison to bool should be reworded
|
|
|
|
ignore = E101,E116,E121,E123,E122,E124,E126,E127,E128,E129,E203,E211,E225,E226,E228,E231,E241,E251,E261,E265,E302,E303,E501,E712
|
|
|
|
[testenv:pep8]
|
|
usedevelop = False
|
|
skip_install = True
|
|
deps =
|
|
pep8
|
|
commands =
|
|
pep8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|