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 uncondtionally ignores all files in folders starting with a dot #176

Closed
Jackenmen opened this issue Sep 13, 2022 · 1 comment · Fixed by #188
Closed

ruff uncondtionally ignores all files in folders starting with a dot #176

Jackenmen opened this issue Sep 13, 2022 · 1 comment · Fixed by #188

Comments

@Jackenmen
Copy link
Contributor

Noticed it while looking through some of the ruff's code and I realized that this means that when I put scripts in a folder such as .github/workflows/scripts, ruff won't lint it unless I explicitly pass the .github folder to it (I verified this by checking the output of ruff with -v flag on a project where I have Python files in .github folder).

I'm unsure what's a good solution here though, clearly there can be hidden folders which a user would want linter to include (as the mentioned .github folder) but there are many hidden folders (and some not hidden) that you would want to be excluded by default.
flake8 keeps a small default exclusion list but personally I think it's way too small as it doesn't even include such a common exclusion as .venv folder (and what's worse, flake8 also doesn't allow users to add user-specific exclusions anymore either).

#174 might make it less painful if the default exclusion of all hidden folders were removed but I'm not sure it solves the problem entirely as I imagine you could want to test non-Git projects with ruff and still get reasonable results. I think that adding some default exclusion list could be beneficial here but I don't think it should really be as small as flake8's - I think Black's default exclusion list is a lot better in that regard.

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