LicenseFinder icon indicating copy to clipboard operation
LicenseFinder copied to clipboard

LicenseFinder not finding all licenses

Open shubhdeeprajput opened this issue 1 year ago • 5 comments

We wanted to use license finder tool for finding licenses in our repos, but while I was testing the tool, i found out that it is not listing all the licenses. May I know whats the depth to which this tool runs? Is there a predefined list of licenses that can be detected by this tool?

shubhdeeprajput avatar Oct 11 '22 06:10 shubhdeeprajput

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Oct 11 '22 06:10 cf-gitbot

Hey @shubhdeeprajput ! The following places will probably be useful for you:

https://github.com/pivotal/LicenseFinder/tree/master/lib/license_finder/license/templates https://github.com/pivotal/LicenseFinder/blob/master/lib/license_finder/license/definitions.rb

Are your license showing up as unknown or are the dependencies just not listed? It could also be an issue with unsupported package managers

xtreme-shane-lattanzio avatar Nov 01 '22 20:11 xtreme-shane-lattanzio

Hey @xtreme-shane-lattanzio I have gone through above mentioned files. I wanted to confirm if license finder only finds licenses defined in these files and where can we add more licenses?

shubhdeeprajput avatar Nov 02 '22 07:11 shubhdeeprajput

@shubhdeeprajput Those files are used for matching purposes for the most part so that when we find a license, we can basically standardize our output. If you have different licenses than what is there, we would be happy to accept a new PR with them added. We would also need a test added with a fixture that has that license to make sure that it works as expected.

In general, we get dependencies from package manager files and their associated licenses. The formatting of these licenses may be different from one to another so we have these definitions and templates to do a best effort matching.

Hope this helps!

xtreme-shane-lattanzio avatar Nov 02 '22 14:11 xtreme-shane-lattanzio

@shubhdeeprajput To further clarify, license_finder works with other licenses not defined in definitions.rb. But it won't "pretty print" them or know to consider multiple permutations as the same license. For example if there's a license "Foo Bar License", which people sometimes write as "FBL" or "Foo Bar" or "Foo Bar License", because there is no support in definitions.rb for this license, license_finder will see all of those as being 3 different licenses. But regardless, you could add all 3 as permitted_licenses and it will respect that. So I think to answer your question about whether "license finder only finds licenses defined in these files" I think the answer is No. @xtreme-shane-lattanzio do you agree?

mtoneil avatar Nov 14 '22 21:11 mtoneil