iandotkelly / nlf

Node License Finder
MIT License
152 stars 41 forks source link

File search too broad #25

Closed myndzi closed 9 years ago

myndzi commented 9 years ago

I was getting some "interesting" results from one project. The project contains the swagger-ui repo in a subdirectory. Apparently, NLF is recursing all subdirectories of the main project, including this one, and including the node_modules dependencies -- giving a nonsensical list that looks something like this:

├── license files: Apache, BSD, GPL, LGPL, MIT, MPL
└── readme files: BSD, MIT

It's probably a good idea to not recurse past any directory named node_modules or bower_components, since the contents of these are conceptually separate packages.

iandotkelly commented 9 years ago

I can't replicate this issue - I created a new project with a swagger-ui dependency. When I run nlf I get:

swagger-ui@2.1.0 [license(s): Apache 2.0]
└── package.json:  Apache 2.0

test@1.0.0 [license(s): ISC]
└── package.json:  ISC

LICENSES: Apache 2.0, ISC

What version of swagger-ui are you using?

myndzi commented 9 years ago

I should specify that I did not use npm install swagger-ui -- I cloned the repo into project/swagger-ui and checked it in because I needed to modify it. The current code does superficially ignore the contents of project/node_modules, but it doesn't ignore things like project/subdir/node_modules.

myndzi commented 9 years ago

(Be sure to npm install after cloning if you're trying to reproduce)

iandotkelly commented 9 years ago

Closed with #26