jpeddicord / askalono

A tool & library to detect open source licenses from texts
Apache License 2.0
255 stars 25 forks source link

Crawl nested licenses [add option to not use gitignore] #56

Open 4rokis opened 4 years ago

4rokis commented 4 years ago

Command askalono crawl {directory}

Checks the directory and if the directory has license file it exits with the results.

Folder structure

Call askalono crawl ./root

Returns:

{LICENSE1 analysis}
{LICENSE3 analysis}

However I need for it to return all of the license files

{LICENSE1 analysis}
{LICENSE2 analysis}
{LICENSE3 analysis}

Is that somehow possible?

:sob: I cannot read RUST :sweat:

jpeddicord commented 4 years ago

Hi! It should definitely be crawling through all directory levels. Is there a specific file path (with file name) that it's missing? By default, crawl will only look at files that it thinks are licenses (from the name). If you'd like to have it attempt to identify everything, you can try this:

askalono crawl --glob='*' ./root
4rokis commented 4 years ago

Hmm, you are correct, i have overlooked that. It seems that it is just ignoring node_modules folder. Is there some specific reason for that?

4rokis commented 4 years ago

My usage is that i want to go thought all of your dependencies of the project and check the licenses you are using. Therefore i need for it to go thought node_modules. It is fine if run it on root/node_modules. However some modules have nested node_modules and they got ignored

jpeddicord commented 4 years ago

Ah! Do you have node_modules in your .gitignore?

4rokis commented 4 years ago

For sure it is there.... :facepalm: Why i haven't thought about it

jpeddicord commented 4 years ago

That's probably it. I'll keep this issue open to add a flag to askalono to not use gitignore, since I could see wanting to both ignore and crawl it.

4rokis commented 4 years ago

It works. Thanks very much for the support