Skip to content

Commit 10841c6

Browse files
committed
tox: Add auto-format and and auto-fix
"tox -e fix" will fix whatever ruff knows how to fix automatically. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent 884cae9 commit 10841c6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ The linter in CI/CD will check that new TUF code is formatted with
7676
command line:
7777
::
7878

79-
$ ruff format .
79+
$ tox -e fix

tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ commands =
5353

5454
mypy {[testenv:lint]lint_dirs}
5555

56+
[testenv:fix]
57+
changedir = {toxinidir}
58+
deps = {[testenv:lint]deps}
59+
commands =
60+
ruff check --fix {[testenv:lint]lint_dirs}
61+
ruff format {[testenv:lint]lint_dirs}
62+
5663
[testenv:docs]
5764
deps =
5865
-r{toxinidir}/requirements/docs.txt

0 commit comments

Comments
 (0)