[tox]
isolated_build = True
envlist = py311,py312,py313,quality

[testenv]
description = Run tests with coverage
deps =
    pytest
    pytest-cov
    coverage
setenv =
    COVERAGE_CORE = sysmon
commands =
    pytest tests/ --cov=pylint_sort_functions --cov-report=term-missing --cov-report=html --cov-report=xml
    coverage report --fail-under=100

[testenv:quality]
description = Run quality checks (linting, type checking, plugin self-check)
deps =
    mypy
    ruff
    pylint
    types-setuptools
commands =
    mypy src/ tests/
    ruff check src tests
    pylint --load-plugins=pylint_sort_functions --disable=all --enable=unsorted-functions,unsorted-methods,mixed-function-visibility,function-should-be-private src/

[testenv:docs]
description = Build documentation
deps =
    sphinx
    sphinx-rtd-theme
    sphinx-click
    sphinx-autodoc-typehints
commands =
    sphinx-build -W -b html docs docs/_build/html
