-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Symlinked files are ignored #256
Comments
Hi @magillj, thank you for the detailed issue report! The module we're using to enumerate files, walkdir, supports an option to follow symlinks. This option has been off in this project since the very first commit! I don't see a reason why we couldn't turn this option on 🤔 A PR with this change as well as a test to cover it would be very welcome :) might you have time to take a shot at a PR? If not, no worries, I'll try to get to it soon |
Sure I might be able to give it a shot within the next couple weeks |
any updates on this? |
Adding a test for: - file symlinks - directory symlinks Fixes #256
Adding a test for: - file symlinks - directory symlinks Fixes #256
So yeah, I have an update on this. OF COURSE SYMLINKS ARE A PITA ON WINDOWS! 😢 Will try to find a solution. |
Done, will be available in the next release of depcheck. Sorry it took so long, real life got in the way :) Cheers |
Thanks for the update! There is one more feature that we would like, will open another issue about that soon. However may I suggest you make the following symlinks feature optional? Not our use case per se, but you may want to honor |
Oh, I didn't know about Would you like to make a PR for this? This would be a great time to drop node 6 support too ( |
I'm planning to open a PR anyway, I will see what I can do |
depcheck does not process source files that are symlinked to a file outside the package being analyzed.
This is simple to repro:
var test = require('lodash');
I found the problematic code: only regular files (the type 'file') are checked. This group does not include the 'link' category, which contains the symlinks in question. That's why they're ignored.
Context: the reason I have to worry about symlinks is that I'm using this within a bazel build system, which symlinks groups of source files to sandbox environments where tests run.
The text was updated successfully, but these errors were encountered: