LicenseFinder
LicenseFinder copied to clipboard
LicenseFinder not finding all licenses
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?
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.
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
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 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!
@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?