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

Respect --force-exclude for lint.exclude and format.exclude #8393

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

charliermarsh
Copy link
Member

Summary

We typically avoid enforcing exclusions if a file was passed to Ruff directly on the CLI. However, we also allow --force-exclude, which ignores excluded files even if they're passed to Ruff directly. This is really important for pre-commit, which always passes changed files -- we need to exclude files passed by pre-commit if they're in the exclude lists.

Turns out the new lint.exclude and format.exclude settings weren't respecting --force-exclude.

Closes #8391.

@charliermarsh charliermarsh added bug Something isn't working cli Related to the command-line interface labels Oct 31, 2023
Copy link
Contributor

PR Check Results

Ecosystem

✅ ecosystem check detected no linter changes.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@charliermarsh charliermarsh merged commit 1642f4d into main Oct 31, 2023
17 checks passed
@charliermarsh charliermarsh deleted the charlie/force-exclude branch October 31, 2023 21:45
@charliermarsh
Copy link
Member Author

No prob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint.exclude and format.exclude don't respect --force-exclude
2 participants