astral-sh / astral-sh/ruff-pre-commit
Consider not using --force-exclude by default
- Dominant language
- Python
- Stars
- 2k
- Forks
- 105
- Avg merge
- 8h 36m
- Merged PRs (30d)
- 1
Description
Contrary to #19, making `--force-exclude` an implicit default can cause confusing behaviors. As some CI environments might run under [paths that are excluded by default](https://docs.astral.sh/ruff/settings/#exclude) or excluded by custom configuration.
For example, the Bitbucket pipeline runs under `/opt/atlassian/pipelines/agent/build`, which is excluded by default (`build`), so running `pre-commit run --all-files` takes no effect at all, but it totally works as expected under local repo, really confusing!
Take me quite some time to figure out why our CI is not working, apparently, others have the same [problem](https://github.com/astral-sh/ruff/discussions/6191).
I suggest making the `--force-exclude` an opt-in, or at least add a reminder in README for setting `--no-force-exclude`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.