🚀 Feature Request: Exclude Files Using .gitignore Doesn't Work
🐛 Bug Description
It seems that Crabviz is not respecting .gitignore rules when generating function call graphs. Specifically, I am trying to exclude all .spec.ts files from the analysis, but they still appear in the output.
🔄 Steps to Reproduce
- Add
**/*.spec.tsto your.gitignorefile. - Run Crabviz to generate the call graph.
- Notice that
.spec.tsfiles are still included in the output.
🎯 Expected Behavior
Crabviz should exclude any files that match patterns defined in .gitignore, or tsconfig preventing .spec.ts files (or any ignored files) from appearing in the call graph.
🛠️ Environment
-
Crabviz Version:
0.4.0 -
VS Code Version:
1.97.1 -
Operating System:
Mac OSx Sequoia - Version 15.3.1 (24D70)
📝 Additional Context
- I verified that my
.gitignorerule is correct and that the files are properly ignored by Git. - If this feature was recently added, it may not be working as expected.
Would love to see this fixed! 🦀✨
Thanks for the great tool! 🚀🔥
Sorry for the late reply. And thank you very much for this detailed bug report! I'll look into it, and try to fix it before next release.
As for the ignore config files, Crabviz currently just supports .gitignore files. There are many types of ignore config files of different formats, I think we shouldn't put too much effort in supporting those files.
I've tested this, and Crabviz worked fine. I think it's because you modified the .gitignore file after you run Crabviz.
Crabviz caches ignoring rules after it reads the rules, so if you want the modifications work, just reload window after you modify ignoring rules. I don't want to change this, because modifying .gitignore is not a frequent behavior, I think we don't need to check if the .gitignore files are modified every time it generates a call graph.