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

sub --dir blacklist #10

Open
jkowalleck opened this issue Feb 28, 2023 · 3 comments
Open

sub --dir blacklist #10

jkowalleck opened this issue Feb 28, 2023 · 3 comments

Comments

@jkowalleck
Copy link
Member

jkowalleck commented Feb 28, 2023

I see a CLI parameter --dir which might cause the tool to scan for licenses in a certain directory.
I expect the tool traverse also all subdirectories in that directories.

I would love to have an option to omit certain subdirectories and files in arbitrary depth.
Maybe exclude via a glob?

Use case examples:
scan all files in ./myProject/ but do not traverse any of the following directories: .git, node_modules, vendor, .venv, .pipenv and do not scan files like license.js

structure be like

|- myImages
\- myProject
   |- README.md
   |- .git/...   << ignore 
   |- webUI
   |  |- node_modules/...  << ignore 
   |  |- package.json
   |  |- index.js
   |  |- workspaces
   |  |  \- license
   |  |    |- node_modules/...  << ignore 
   |  |    |- package.json
   |  |    \- license.js        << ignore 
   |  \- LICENSE.mit
   |- serverA
   |  |- LICENSE
   |  \- serve
   |     \- .pipenv/...  << ignore 
   \- serverB
      |- vendor/... << ignore 
      |- composer.json
      |- index.php
      \- License

call could be like license-scanner --dir=./myProject --ignore-glob=node_modules --ignore-glob=vendor --ignore-glob=.git --ignore-glob='.*env' --ignore-glob=license.js

@markstur
Copy link
Contributor

Thanks. Absolutely meant to have this as one of our first feature/issue requests. Glad to see you covered files as well as subdirs.

@markstur
Copy link
Contributor

TBD: Let's consider what default ignores should be for standard things. Can be set in config.json for easy customizing (with overrides by flags).

@jkowalleck jkowalleck changed the title sub dir blacklist sub --dir blacklist Mar 1, 2023
@jkowalleck
Copy link
Member Author

Let's consider what default ignores should be for standard things

"default ignores" are another story, out of scope of this feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants