Skip to content

Commit 4b12fb8

Browse files
committed
tox: Add 'lint' target
This simply runs the same commands as the GitHub CI workflows. Signed-off-by: Stephen Finucane <[email protected]>
1 parent f2f2e79 commit 4b12fb8

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ env:
1313
FORCE_COLOR: "1"
1414

1515
jobs:
16+
# If you update any of these commands, don't forget to update the equivalent
17+
# tox environment
1618
ruff:
1719
runs-on: ubuntu-latest
1820

@@ -101,7 +103,7 @@ jobs:
101103
run: >
102104
sphinx-lint
103105
--enable line-too-long
104-
--max-line-length 85
106+
--max-line-length 85
105107
CHANGES
106108
CONTRIBUTING.rst
107109
README.rst

tox.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ setenv =
2525
commands=
2626
python -X dev -X warn_default_encoding -m pytest --durations 25 {posargs}
2727

28+
[testenv:lint]
29+
description =
30+
Run linters.
31+
extras =
32+
lint
33+
# If you update any of these commands, don't forget to update the equivalent
34+
# GitHub Workflow step
35+
commands =
36+
ruff . --diff --format github
37+
flake8 .
38+
isort --check-only --diff .
39+
mypy sphinx/
40+
2841
[testenv:docs]
2942
description =
3043
Build documentation.

0 commit comments

Comments
 (0)