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

The cli option --ignore-dirs seems not to work #331

Closed
DavidBabel opened this issue Mar 18, 2019 · 2 comments
Closed

The cli option --ignore-dirs seems not to work #331

DavidBabel opened this issue Mar 18, 2019 · 2 comments
Labels

Comments

@DavidBabel
Copy link

Bug Description

I use the cli, and when i run this command :

depcheck . --ignores="@types/*,tslib,csstype" --ignore-bin-package=true --ignore-dirs=legacy

But the legacy directory is not ignored.

Versions

  • node -v: v11.11.0
  • npm -v: 6.7.0
  • depcheck --version: 0.7.2

Extra info

Note that it exists a legacy/package.json file.

I checked that the option is correctly passed into cli.js and it is.

@rumpl rumpl added the bug label Mar 18, 2019
@rumpl
Copy link
Member

rumpl commented Mar 18, 2019

Thanks for reporting this, I'll take a look when I have the time.

Cheers

@rumpl
Copy link
Member

rumpl commented Mar 19, 2019

Hm, that's odd, I just checked with this:

➜  dep ls -lR
total 16
drwxr-xr-x  3 dlukic  wheel   96 Mar 19 08:29 ignore
-rw-r--r--  1 dlukic  wheel   30 Mar 19 08:29 index.js
-rw-r--r--  1 dlukic  wheel  217 Mar 19 08:28 package.json

./ignore:
total 8
-rw-r--r--  1 dlukic  wheel  30 Mar 19 08:29 index.js

➜  dep cat index.js 
const toto = require('toto');
➜  dep cat ignore/index.js 
const tata = require('tata');

If I run depcheck I get:

➜  dep npx depcheck .
Missing dependencies
* tata
* toto

And if I tell it to ignore the ignore directory:

➜  dep npx depcheck . --ignore-dirs=ignore 
Missing dependencies
* toto

I'll close this one for now, feel free to open a new one with a reproducible setup.

Cheers

@rumpl rumpl closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants