-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider always using --force-exclude #19
Comments
I think this would be a good change. (Ruff should be fine with receiving that argument twice, and I think users could override it by passing |
Users can also override it by adding |
Closes #19. Signed-off-by: Henry Schreiner <[email protected]>
Re: astral-sh/ruff-pre-commit#19 / astral-sh/ruff-pre-commit#20 This is now always set, no need to include it in the README example.
FWIW Ruff is definitely not fine with receiving that option twice. I just received a pre-commit.ci autoupdate PR where it fails: https://results.pre-commit.ci/run/github/584046811/1674533685.HvDYs3ClQkqwyoDsCuLJvQ |
This is now always passed in the pre-commit hook. See astral-sh/ruff-pre-commit#19
If it's true that running in pre-commit always needs
--force-exclude
to work properly, then you can set it as part of the entry, such as:This will then always include this option when running, regardless of what args is set to. Assume ruff is fine if this is passed twice (for backward compatibly with existing user's
args:
), then this is the recommended way to do this (for an example, see https://github.com/pre-commit/mirrors-clang-format/blob/ea59a72ffc9a1ce6b79b02a8076d031aa7ea7805/.pre-commit-hooks.yaml#L4 ).If it's not the case that this (or any other flag) is always required for pre-commit, then nevermind. :)
The text was updated successfully, but these errors were encountered: