Skip to content

Commit 39f54b7

Browse files
authored
Add and prefer the ruff-check pre-commit ID (#124)
## Summary Towards #123. Introduces the `ruff-check` pre-commit hook ID, updates documentation to prefer it, but retains the `ruff` ID for compatibility.
1 parent 24e02b2 commit 39f54b7

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.pre-commit-hooks.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
- id: ruff
2-
name: ruff
3-
description: "Run 'ruff' for extremely fast Python linting"
1+
- id: ruff-check
2+
name: ruff check
3+
description: "Run 'ruff check' for extremely fast Python linting"
44
entry: ruff check --force-exclude
55
language: python
66
types_or: [python, pyi, jupyter]
@@ -10,7 +10,7 @@
1010
minimum_pre_commit_version: "2.9.2"
1111

1212
- id: ruff-format
13-
name: ruff-format
13+
name: ruff format
1414
description: "Run 'ruff format' for extremely fast Python formatting"
1515
entry: ruff format --force-exclude
1616
language: python
@@ -19,3 +19,15 @@
1919
require_serial: true
2020
additional_dependencies: []
2121
minimum_pre_commit_version: "2.9.2"
22+
23+
# Legacy alias
24+
- id: ruff
25+
name: ruff (legacy alias)
26+
description: "Run 'ruff check' for extremely fast Python linting"
27+
entry: ruff check --force-exclude
28+
language: python
29+
types_or: [python, pyi, jupyter]
30+
args: []
31+
require_serial: true
32+
additional_dependencies: []
33+
minimum_pre_commit_version: "2.9.2"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
rev: v0.11.9
2424
hooks:
2525
# Run the linter.
26-
- id: ruff
26+
- id: ruff-check
2727
# Run the formatter.
2828
- id: ruff-format
2929
```
@@ -37,7 +37,7 @@ repos:
3737
rev: v0.11.9
3838
hooks:
3939
# Run the linter.
40-
- id: ruff
40+
- id: ruff-check
4141
args: [ --fix ]
4242
# Run the formatter.
4343
- id: ruff-format
@@ -52,7 +52,7 @@ repos:
5252
rev: v0.11.9
5353
hooks:
5454
# Run the linter.
55-
- id: ruff
55+
- id: ruff-check
5656
types_or: [ python, pyi ]
5757
args: [ --fix ]
5858
# Run the formatter.

0 commit comments

Comments
 (0)