validators, tests

This commit is contained in:
Devaev Maxim
2019-04-06 05:32:02 +03:00
parent 73e04b71ed
commit 1d75b738a0
44 changed files with 1616 additions and 311 deletions

View File

@@ -1,48 +1,50 @@
[tox]
envlist = flake8, pylint, mypy, vulture, eslint, htmlhint
envlist = flake8, pylint, mypy, vulture, pytest, eslint, htmlhint
skipsdist = True
[testenv]
basepython = python3.7
changedir = /kvmd
changedir = /src
[testenv:flake8]
commands = flake8 --config=testenv/tox.ini kvmd genmap.py
commands = flake8 --config=testenv/linters/flake8.ini kvmd genmap.py tests
deps =
flake8
flake8-double-quotes
-rrequirements.txt
[testenv:pylint]
commands = pylint --rcfile=testenv/pylintrc --output-format=colorized --reports=no kvmd genmap.py
commands = pylint --rcfile=testenv/linters/pylint.ini --output-format=colorized --reports=no kvmd genmap.py tests
deps =
pylint
pytest
pytest-asyncio
-rrequirements.txt
[testenv:mypy]
commands = mypy --config-file=testenv/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py
commands = mypy --config-file=testenv/linters/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py tests
deps =
mypy
-rrequirements.txt
[testenv:vulture]
commands = vulture --ignore-names=_format_P --ignore-decorators=@_exposed,@_system_task kvmd genmap.py testenv/vulture-wl.py
commands = vulture --ignore-names=_format_P --ignore-decorators=@_exposed,@_system_task kvmd genmap.py tests testenv/linters/vulture-wl.py
deps =
vulture
-rrequirements.txt
[testenv:pytest]
commands = py.test -vv --cov-config=testenv/linters/coverage.ini --cov-report=term-missing --cov=kvmd tests
deps =
pytest
pytest-cov
pytest-asyncio
-rrequirements.txt
[testenv:eslint]
whitelist_externals = eslint
commands = eslint --config=testenv/eslintrc.yaml --color --ext .js web/share/js
commands = eslint --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js
[testenv:htmlhint]
whitelist_externals = htmlhint
commands = htmlhint web/*.html web/*/*.html
[flake8]
max-line-length = 160
# W503 line break before binary operator
# E227 missing whitespace around bitwise or shift operator
# E241 multiple spaces after
# E252 missing whitespace around parameter equals
ignore=W503,E227,E241,E252