Deprecate hook name lint
; add hook name ruff
(#4)
This commit is contained in:
parent
1c077b20b0
commit
301fe68ff7
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@ -22,6 +22,23 @@ jobs:
|
|||||||
git config user.name 'Github Actions'
|
git config user.name 'Github Actions'
|
||||||
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||||
|
|
||||||
- run: pre-commit-mirror --language python --package-name ruff --entry ruff --id lint --types python --description "Run ruff to lint Python files." .
|
- run: >
|
||||||
|
pre-commit-mirror
|
||||||
|
--language python
|
||||||
|
--package-name ruff
|
||||||
|
--entry ruff
|
||||||
|
--id ruff
|
||||||
|
--types python
|
||||||
|
--description "Run `ruff` for extremely fast Python linting" .
|
||||||
|
|
||||||
|
# Intended for removal November 2022 (1 month after deprecation)
|
||||||
|
- run: >
|
||||||
|
pre-commit-mirror
|
||||||
|
--language python
|
||||||
|
--package-name ruff
|
||||||
|
--entry ruff
|
||||||
|
--id lint
|
||||||
|
--types python
|
||||||
|
--description "Deprecated: use hook id `ruff` instead. Planned removal 2022-11-30" .
|
||||||
|
|
||||||
- run: git push origin HEAD:refs/heads/main --tags
|
- run: git push origin HEAD:refs/heads/main --tags
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
- id: lint
|
- id: ruff
|
||||||
name: ruff
|
name: ruff
|
||||||
description: 'Run ruff to lint Python files.'
|
description: 'Run `ruff` for extremely fast Python linting'
|
||||||
|
entry: ruff
|
||||||
|
language: python
|
||||||
|
'types': [python]
|
||||||
|
args: []
|
||||||
|
require_serial: false
|
||||||
|
additional_dependencies: []
|
||||||
|
minimum_pre_commit_version: '0'
|
||||||
|
- id: lint
|
||||||
|
name: ruff
|
||||||
|
description: 'Deprecated: use hook id `ruff` instead. Planned removal 2022-11-30'
|
||||||
entry: ruff
|
entry: ruff
|
||||||
language: python
|
language: python
|
||||||
'types': [python]
|
'types': [python]
|
||||||
|
15
README.md
15
README.md
@ -5,6 +5,21 @@ A [pre-commit](https://pre-commit.com/) hook for [ruff](https://github.com/charl
|
|||||||
Distributed as a standalone repository to enable installing ruff via prebuilt wheels from
|
Distributed as a standalone repository to enable installing ruff via prebuilt wheels from
|
||||||
[PyPI](https://pypi.org/project/ruff/).
|
[PyPI](https://pypi.org/project/ruff/).
|
||||||
|
|
||||||
|
For pre-commit: see https://github.com/pre-commit/pre-commit
|
||||||
|
|
||||||
|
For ruff: see https://github.com/charliermarsh/ruff
|
||||||
|
|
||||||
|
### Using ruff with pre-commit
|
||||||
|
|
||||||
|
Add this to your `.pre-commit-config.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||||
|
rev: '' # Use the sha / tag you want to point at
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
Loading…
Reference in New Issue
Block a user