Symlinked files are ignored
See original GitHub issuedepcheck does not process source files that are symlinked to a file outside the package being analyzed.
This is simple to repro:
- Create a new package with a blank package.json
- Add a js file where the only line is
var test = require('lodash');
- Running depcheck on that package properly shows that the dependency lodash is missing
- Move the js file somewhere outside the package and symlink to it inside the package
- depcheck reports no issues
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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Telling git to ignore symlinks - Stack Overflow
If you really want to ignore a filename if it's a symlink or file but not if it is a directory, you can...
Read more >ebignore includes symlinked files in ignored directories #69
With an eb application and environment set up - where the project contains a directory called ignore and, within that, one standard directory ......
Read more >gitignore Documentation - Git
DESCRIPTION. A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; see the NOTES ......
Read more >git ignore symlink folder
Ignored files are tracked in a special file named.gitignorethat is checked in at the root of your repository. There is no explicit git...
Read more >gitignore - Specifies intentionally untracked files to ignore
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; see the NOTES below...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure I might be able to give it a shot within the next couple weeks
I’m planning to open a PR anyway, I will see what I can do