-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Git-ignore rules inside a project should not match parts of the absolute path outside the project #678
Comments
Thanks for the bug report. I wonder how it's possible the That might be a reason to either improve Knip's docs and/or implementation: perhaps by extending or doing something similar to the source mapping ( |
@webpro here it is: https://github.com/DaAitch/knip-issue-678 I simulated an absolute path, by checking in some folders. The git-ignore rule |
Thanks, that helped a lot. I think I found the issue, it seems to originate here in fast-glob: mrmlnc/fast-glob#441 Need to figure out whether it can/will be fixed downstream, or work around it in Knip. |
@webpro Okay interesting. Here is a red knip unit test DaAitch@5989d4a to reproduce |
Thanks, I'd prefer fixes and test coverage in the downstream lib, let's await that first: mrmlnc/fast-glob#445 |
Knip (5.19.0) may behave differently on different environments, depending on
During the block
knip/packages/knip/src/util/globby.ts
Line 136 in 7c9b645
**
which leads to the problem, that git ignore rules now may match outside the project.Example:
The text was updated successfully, but these errors were encountered: