Closed hakonhagland closed 3 months ago
If I'm not mistaken, this falls out from how pre-commit works. pre-commit passes each hook the list of changed files, so Ruff is still being passed any changed files in docs
.
You can setup your Ruff configuration to exclude docs
by adding a ruff.toml
to your project with:
extend-exclude = ["docs"]
Alternatively, you can configure pre-commit to exclude files when passing them to the hooks -- see the docs here.
You can setup your Ruff configuration to exclude docs by adding a ruff.toml to your project with:
extend-exclude = ["docs"]
@charliermarsh Thanks! That worked :)
No prob :)
How to limit checks to certain directories?
I tried:
but it still checks files in my
docs
folder. So apparently it is not restricted tosrc
andtests
as expected.