mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-20 15:41:05 +00:00
ce88228078
Not necessary anymore as we fixed all the problem or disabled them.
170 lines
4.7 KiB
INI
170 lines
4.7 KiB
INI
[tox]
|
||
envlist = py35, py36, py37, py38, pypy, pylint, benchmark
|
||
skip_missing_interpreters = true
|
||
|
||
[testenv:pylint]
|
||
deps =
|
||
git+https://github.com/pycqa/astroid@master
|
||
isort
|
||
pytest
|
||
commands =
|
||
# This would be greatly simplified by a solution for https://github.com/PyCQA/pylint/issues/352
|
||
pylint -rn --rcfile={toxinidir}/pylintrc --load-plugins=pylint.extensions.docparams, pylint.extensions.mccabe \
|
||
{toxinidir}/pylint \
|
||
{toxinidir}/tests/message/ \
|
||
{toxinidir}/tests/checkers/ \
|
||
{toxinidir}/tests/extensions/ \
|
||
{toxinidir}/tests/utils/ \
|
||
{toxinidir}/tests/acceptance/ \
|
||
{toxinidir}/tests/conftest.py \
|
||
{toxinidir}/tests/test_config.py \
|
||
{toxinidir}/tests/test_func.py \
|
||
{toxinidir}/tests/test_functional.py \
|
||
{toxinidir}/tests/test_import_graph.py \
|
||
{toxinidir}/tests/test_pragma_parser.py \
|
||
{toxinidir}/tests/test_pylint_runners.py \
|
||
{toxinidir}/tests/test_regr.py \
|
||
{toxinidir}/tests/test_self.py \
|
||
{toxinidir}/tests/unittest_config.py \
|
||
{toxinidir}/tests/lint/ \
|
||
{toxinidir}/tests/unittest_pyreverse_diadefs.py \
|
||
{toxinidir}/tests/unittest_pyreverse_inspector.py \
|
||
{toxinidir}/tests/unittest_pyreverse_writer.py \
|
||
{toxinidir}/tests/unittest_reporters_json.py \
|
||
{toxinidir}/tests/unittest_reporting.py
|
||
|
||
[testenv:formatting]
|
||
basepython = python3
|
||
deps =
|
||
black==19.10b0
|
||
isort==4.3.21
|
||
commands =
|
||
black --check . --exclude="tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|venv|astroid|.tox"
|
||
isort -rc . --check-only
|
||
changedir = {toxinidir}
|
||
|
||
[testenv:mypy]
|
||
basepython = python3
|
||
deps =
|
||
typed-ast>=1.4
|
||
mypy>=0.7,<1.0
|
||
|
||
commands =
|
||
python -m mypy {toxinidir}/pylint/checkers --ignore-missing-imports {posargs:}
|
||
|
||
[testenv]
|
||
deps =
|
||
https://github.com/PyCQA/astroid/tarball/master#egg=astroid-master-2.0
|
||
coverage<5.0
|
||
isort
|
||
mccabe
|
||
pytest
|
||
pytest-xdist
|
||
pytest-benchmark
|
||
pytest-profiling
|
||
|
||
setenv =
|
||
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
|
||
|
||
commands =
|
||
; Run tests, ensuring all benchmark tests do not run
|
||
python -Wignore -m coverage run -m pytest --benchmark-disable {toxinidir}/tests/ {posargs:}
|
||
|
||
; Transform absolute path to relative path
|
||
; for compatibility with coveralls.io and fix 'source not available' error.
|
||
; If you can find a cleaner way is welcome
|
||
python -c "import os;cov_strip_abspath = open(os.environ['COVERAGE_FILE'], 'r').read().replace('.tox' + os.sep + os.path.relpath('{envsitepackagesdir}', '{toxworkdir}') + os.sep, '');open(os.environ['COVERAGE_FILE'], 'w').write(cov_strip_abspath)"
|
||
changedir = {toxworkdir}
|
||
|
||
|
||
[testenv:spelling]
|
||
deps =
|
||
https://github.com/PyCQA/astroid/tarball/master#egg=astroid-master-2.0
|
||
pytest
|
||
pytest-xdist
|
||
pyenchant
|
||
|
||
commands =
|
||
python -Wi -m pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling
|
||
|
||
changedir = {toxworkdir}
|
||
|
||
[testenv:coveralls]
|
||
setenv =
|
||
COVERAGE_FILE = {toxinidir}/.coverage
|
||
passenv =
|
||
*
|
||
deps =
|
||
coverage<5.0
|
||
coveralls
|
||
skip_install = true
|
||
commands =
|
||
python -m coverage combine
|
||
python -m coverage report --rcfile={toxinidir}/.coveragerc -m
|
||
- coveralls --rcfile={toxinidir}/.coveragerc
|
||
changedir = {toxinidir}
|
||
|
||
[testenv:coverage-erase]
|
||
setenv =
|
||
COVERAGE_FILE = {toxinidir}/.coverage
|
||
deps =
|
||
coverage<5
|
||
skip_install = true
|
||
commands =
|
||
python -m coverage erase
|
||
changedir = {toxinidir}
|
||
|
||
[testenv:coverage-html]
|
||
setenv =
|
||
COVERAGE_FILE = {toxinidir}/.coverage
|
||
deps =
|
||
coverage<5
|
||
skip_install = true
|
||
commands =
|
||
python -m coverage combine
|
||
python -m coverage html --ignore-errors --rcfile={toxinidir}/.coveragerc
|
||
changedir = {toxinidir}
|
||
|
||
[testenv:docs]
|
||
skipsdist = True
|
||
usedevelop = True
|
||
changedir = doc/
|
||
whitelist_externals = rm
|
||
deps =
|
||
sphinx==2.0
|
||
python-docs-theme
|
||
|
||
commands =
|
||
pip install python_docs_theme
|
||
rm -f features.rst
|
||
python ./exts/pylint_features.py
|
||
rm -f extensions.rst
|
||
python ./exts/pylint_extensions.py
|
||
sphinx-build -W -b html -d _build/doctrees . _build/html
|
||
|
||
[testenv:benchmark]
|
||
deps =
|
||
https://github.com/PyCQA/astroid/tarball/master#egg=astroid-master-2.0
|
||
coverage<5.0
|
||
isort
|
||
mccabe
|
||
pytest
|
||
pytest-xdist
|
||
pygal
|
||
pytest-benchmark
|
||
|
||
commands =
|
||
; Run the only the benchmark tests, grouping output and forcing .json output so we
|
||
; can compare benchmark runs
|
||
python -Wi -m pytest --exitfirst \
|
||
--failed-first \
|
||
--benchmark-only \
|
||
--benchmark-save=batch_files \
|
||
--benchmark-save-data \
|
||
--benchmark-autosave \
|
||
{toxinidir}/tests \
|
||
--benchmark-group-by="group" \
|
||
{posargs:}
|
||
|
||
changedir = {toxworkdir}
|