askalono icon indicating copy to clipboard operation
askalono copied to clipboard

Crawl nested licenses [add option to not use gitignore]

Open 4rokis opened this issue 4 years ago • 7 comments

Command askalono crawl {directory}

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

Folder structure

  • root
    • folder1
      • LICENSE1
      • folder3
        • LICENSE2
    • folder2
      • LICENSE3

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:

4rokis avatar Jun 13 '20 04:06 4rokis

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

jpeddicord avatar Jun 13 '20 17:06 jpeddicord

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 avatar Jun 15 '20 00:06 4rokis

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

4rokis avatar Jun 15 '20 00:06 4rokis

Ah! Do you have node_modules in your .gitignore?

jpeddicord avatar Jun 15 '20 01:06 jpeddicord

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

4rokis avatar Jun 15 '20 01:06 4rokis

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.

jpeddicord avatar Jun 15 '20 01:06 jpeddicord

It works. Thanks very much for the support

4rokis avatar Jun 15 '20 01:06 4rokis