You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PurpleDome/tox.ini

54 lines
1.4 KiB
INI

# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py39
[flake8]
# E501 Line length. Ignored here. But still: please do not abuse the freedom
# W291 trailing whitespace
ignore = E501,
W291
exclude =
.git,
vm_images,
venv,
vagrant_templates,
vagrantboxes,
.vagrant
systems,
real_machines_to_build_vagrant_boxes_from,
__pycache__,
.idea,
htmlcov,
.tox,
max-complexity = 10
[testenv]
deps = -rrequirements.txt
flake8
safety
bandit
pylint
commands =
# python -m unittest discover -s tests
coverage run --source=app -m unittest discover -s tests
# Gotta ignore some flake8 warnings, because they are maskerading real issues.
# Ignoring:
# C901 complex code. Reduce complexitiy. But this thing is over-reacting
# E501: line too long. Please: Still keep it short. But 80 chars is just incredibly short nowadays
flake8 --ignore C901,E501
# Check if dependencies are vulnerable
safety check -r requirements.txt
# Check for common vulnerabilities
bandit -ll -r app/ plugins/ *.py
# Linting
# pylint *.py # currently off. Needs configuration