Skip to content

Commit 02d3235

Browse files
Adds a new helper that runs linters and fixes issues (#3928)
Signed-off-by: Elena Kolevska <elena@kolevska.com>
1 parent 647b0cf commit 02d3235

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ things get stuck, an `invoke clean` can help.
8383
8484
## Linting
8585
86-
Call `invoke linters` to run linters without also running tests.
86+
Call `invoke linters` to run linters without also running tests.
87+
Call `invoke linters-fix` to run linters and automatically fix issues.
8788
8889
## Documentation
8990

tasks.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ def linters(c):
3131
run("ruff format --check --diff tests redis")
3232
run("vulture redis whitelist.py --min-confidence 80")
3333

34+
@task
35+
def linters_fix(c):
36+
"""Run code linters and fix issues"""
37+
run("ruff check --fix tests redis")
38+
run("ruff format tests redis")
3439

3540
@task
3641
def all_tests(c):

0 commit comments

Comments
 (0)