Skip to content
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

Change in extend-exclude behavior #868

Closed
zanieb opened this issue Nov 6, 2023 · 2 comments · Fixed by #869
Closed

Change in extend-exclude behavior #868

zanieb opened this issue Nov 6, 2023 · 2 comments · Fixed by #869

Comments

@zanieb
Copy link

zanieb commented Nov 6, 2023

Upgrading from v1.14.12 to v1.16.22 I'm encountering a typo detected in a file which should be excluded.

With the configuration:

[files]
extend-exclude = ["resources", "snapshots"]

The file crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__match_cases.snap has a fixed typo.

You can reproduce this with pre-commit run --all-files in https://github.com/astral-sh/ruff with the bumped version.

Changing to "**/snapshots/**/*" resolves this.

Please let me know if you need more information or if this is expected. I can produce a smaller example if necessary.

@epage
Copy link
Collaborator

epage commented Nov 6, 2023

I'm assuming this was broken by #837 (had worried there was a corner case like this). I have a local reproduction case.

The odd thing is that I would assume the exclude key in your pre-commit hook would prevent this from being hit.

@zanieb
Copy link
Author

zanieb commented Nov 6, 2023

Thanks for the fast fix. Gosh who knows what's up with the pre-commit hook exclude, guess that's the next thing to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants