Exclude a directory but include specific directory nested inside #16531
-
I have a
It seems that Ruff doesn't follow
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I assume you have reasons to use But yes, you're right. Ruff's |
Beta Was this translation helpful? Give feedback.
Yes, the
gitignore
takes precedence before any ruff level filtering.I'm now not sure I understand your issue. I understand that you want to include
foo/bar/baz/specific_file.py
anddir1/dir2/qux
and excludefoo/bar/baz/*
anddir1/dir2/*
which is what you have in your.gitignore
... Actually, yourgitignore
might be incorrect if that's what you want. I think the negative excludes need to come last or git will reincluded (re-ignore) the files because they match patterns later in the file