[tox]
requires =
    tox>=4.2
env_list =
    lint
    py{py3, 314, 313, 312, 311, 310}

[testenv]
extras =
    tests
pass_env =
    FORCE_COLOR
commands =
    {envpython} -m pytest \
      --cov sphinxlint \
      --cov tests \
      --cov-report html \
      --cov-report term \
      --cov-report xml \
      {posargs}

[testenv:lint]
skip_install = true
deps =
    pre-commit
pass_env =
    PRE_COMMIT_COLOR
commands =
    pre-commit run --all-files --show-diff-on-failure
