Generate license text when missing for detected license #223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #189
This PR takes an alternate approach to reducing friction when license data is only found in a package manager file. Rather than writing the package manager content to the cached data, this takes an approach of caching the default license text, as known and provided by
licensee
.The generated data is only included if no other license contents are found (from
LICENSE
files, readme text, etc) and a non-"other" license is found for a dependency.This means that for the (hopefully) majority of cases where license text isn't included, the tool will be able to provide some default text. The only complication is that many package managers don't include publish dates or authors as part of the package metadata, which makes generating any copyright clauses hard. As a result I am stripping any copyright contents from the license templates when caching data.
I've set the
sources
property for the text to specify that the text is auto generated, rather than coming from a file.@mlinksva is this approach viable? I'm not sure if this would be ok, given that the license content isn't coming from the package author and doesn't include a copyright.