Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: reintroduce pylint in tox #4073

Merged
merged 6 commits into from
Mar 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tox.ini
mr-cal marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
# * Include isort
# * Do not use tmpfs for a temporary directory as it does not support user xattrs
# * Legacy tests (inherited from integration tests) include coverage
# * Pylint included

[tox]
env_list = # Environments to run when called with no parameters.
lint-{black,ruff,isort,mypy,pyright,shellcheck,codespell,yaml}
lint-{black,ruff,isort,mypy,pylint,pyright,shellcheck,codespell,yaml}
test-py38
test-legacy-py38
minversion = 3.8
Expand Down Expand Up @@ -117,6 +118,19 @@ commands =
codespell: codespell --toml {tox_root}/pyproject.toml {posargs}
yaml: yamllint {posargs} .

[testenv:lint-pylint]
description = Lint with pylint
base = testenv
labels = lint
deps = -r{tox_root}/requirements-devel.txt
package = editable
# This runs all commands even if the first fails.
# Not to be confused with ignore_outcome, which turns errors into warnings.
ignore_errors = true
commands =
pylint -j 0 snapcraft
pylint -j 0 tests --disable=invalid-name,missing-module-docstring,missing-function-docstring,duplicate-code,protected-access,unspecified-encoding,too-many-public-methods,too-many-arguments,too-many-lines,redefined-outer-name

[testenv:lint-{mypy,pyright}]
description = Static type checking
base = testenv
Expand Down