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

Resolve paths of .gitignore files in subfolders #36

Closed
MuTsunTsai opened this issue Oct 29, 2024 · 1 comment
Closed

Resolve paths of .gitignore files in subfolders #36

MuTsunTsai opened this issue Oct 29, 2024 · 1 comment
Labels
bug Something isn't working classification Related to classifying files fixed This issue has been fixed

Comments

@MuTsunTsai
Copy link

In one of my project I'm using mypy, which automatically creates a .mypy_cache subfolder with its own .gitignore file inside, and the file contains a single rule *, which is supposed to mean "ignore everything in this subfolder". Because it already comes with its own .gitignore, I didn't add the .mypy_cache folder to my top-level .gitignore file.

Now comes the problem. As linguist-js read this file, it adds the rule * into its ignore list, resulting the report being nearly completely empty (except for a few dot-files).

This looks like a bug to me. It should instead add .mypy_cahce/* after resolving the rule against the subfolder.

My current workaround is just adding .mypy_cache folder to my top-level .gitignore, so that the subfolder .gitignore is never processed by linguist-js in the first place.

@Nixinova Nixinova added bug Something isn't working classification Related to classifying files labels Nov 4, 2024
@Nixinova
Copy link
Owner

Nixinova commented Nov 4, 2024

Fixed, v2.8.1 will no longer have this issue 👍

@Nixinova Nixinova added the fixed This issue has been fixed label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working classification Related to classifying files fixed This issue has been fixed
Projects
None yet
Development

No branches or pull requests

2 participants