[tox]
envlist =
    clean,
    test,
    cov
skip_missing_interpreters = True
isolated_build = True


[testenv:isort]
deps = isort
commands = isort src/djlint
skip_install: true


[testenv:black]
deps = black
commands = black src/djlint
skip_install: true

[testenv:lint]
deps =
    reformat
    flake8
    flake8-bugbear
    flake8-docstrings
    flake8-rst-docstrings
    flake8-rst
    flake8-builtins
    pep8-naming
    flake8-comprehensions
    flake8-bandit
    flake8-eradicate
    flake8-pytest-style
    flake8-print
    flake8-simplify
    flake8-variables-names
    flake8-markdown
    pygments
    black
    pylint
    mypy
    types-PyYAML
    check-manifest
commands =
    flake8 src/djlint
    black --fast --check src/djlint
    pylint src/djlint
    mypy src/djlint
    ; check-manifest -v
skip_install: true


[testenv:clean]
skip_install: true
deps = coverage
commands = coverage erase

[testenv]
deps = .[test]
commands =
    pytest --cov --cov-append --cov-report=term-missing --disable-warnings --junitxml=report.xml
depends =
    test: clean
    cov: test
skip_install: true

[testenv:cov]
skip_install: true
deps = coverage
commands =
    coverage report -m
    coverage xml
