astral-sh / astral-sh/ruff-pre-commit
How to configure include for pre-commit
- Dominant language
- Python
- Stars
- 2k
- Forks
- 105
- Avg merge
- 8h 36m
- Merged PRs (30d)
- 1
Description
When I use `ruff` with `include` from my shell, its work and ignore all directory and only apply ruff to the include directory.
```
ruff check --config 'include = ["core/others/"]'
```
But when I'm going to use `include` with `pre-commit` its not working
```
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.2.2'
hooks:
- id: ruff
include: "[core/drones/api_extern/**/*.py]"
```
But `exclude` works -
```
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.2.2'
hooks:
- id: ruff
exclude: "(core/others/)"
```
I'm using a `ruff.toml` also where `exclude=[...]` basing excluding list.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.