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.
This commit is contained in:
Adam Turner 2025-05-13 14:16:04 +01:00 committed by GitHub
parent 24e02b24b8
commit 39f54b73c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,6 @@
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
- id: ruff-check
name: ruff check
description: "Run 'ruff check' for extremely fast Python linting"
entry: ruff check --force-exclude
language: python
types_or: [python, pyi, jupyter]
@ -10,7 +10,7 @@
minimum_pre_commit_version: "2.9.2"
- id: ruff-format
name: ruff-format
name: ruff format
description: "Run 'ruff format' for extremely fast Python formatting"
entry: ruff format --force-exclude
language: python
@ -19,3 +19,15 @@
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"
# Legacy alias
- id: ruff
name: ruff (legacy alias)
description: "Run 'ruff check' for extremely fast Python linting"
entry: ruff check --force-exclude
language: python
types_or: [python, pyi, jupyter]
args: []
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"

View File

@ -23,7 +23,7 @@ repos:
rev: v0.11.9
hooks:
# Run the linter.
- id: ruff
- id: ruff-check
# Run the formatter.
- id: ruff-format
```
@ -37,7 +37,7 @@ repos:
rev: v0.11.9
hooks:
# Run the linter.
- id: ruff
- id: ruff-check
args: [ --fix ]
# Run the formatter.
- id: ruff-format
@ -52,7 +52,7 @@ repos:
rev: v0.11.9
hooks:
# Run the linter.
- id: ruff
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.