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

Ruff is run on untracked files despite not being staged. #89

Open
LoganPrice344 opened this issue Jun 3, 2024 · 4 comments
Open

Ruff is run on untracked files despite not being staged. #89

LoganPrice344 opened this issue Jun 3, 2024 · 4 comments
Labels
question Further information is requested

Comments

@LoganPrice344
Copy link

I have run into an issue while attempting to commit changes to my code, where ruff will run on untracked files despite them not being staged.

@charliermarsh
Copy link
Member

Are you seeing this consistently? Can you produce a reproducible example? Ruff doesn't have much control over this -- Ruff just formats the files that are passed to it by pre-commit.

@charliermarsh charliermarsh added the question Further information is requested label Jun 3, 2024
@LoganPrice344
Copy link
Author

Yes anytime I create a new file and it contains any ruff error, it will get flagged when pre-commit runs even when the file is not staged.

@pbastia
Copy link

pbastia commented Jun 14, 2024

I'm seeing the same behaviour (running on OSX Monterey)

@zanieb
Copy link
Member

zanieb commented Jun 15, 2024

Please provide a minimal reproducible example. You may also need to report this upstream i.e. at pre-commit. As Charlie mentioned, there's not much complexity in Ruff's handling here.

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

No branches or pull requests

4 participants