Upgrade dependencies including licenseclassifier/v2#203
Conversation
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
| } | ||
| } | ||
|
|
||
| var typeMap = map[string]Type{ |
There was a problem hiding this comment.
These license types are not available upstream anymore in v2 (I think).
The TestTypes test makes sure we provide a mapping for all license names that we can detect.
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Bobgy
left a comment
There was a problem hiding this comment.
Thank you for helping to upgrade so many dependencies!
It seems that there will be some unavoidable breaking changes introduced by licenseclassifier/v2:
- Support multiple licenses in the same file
- Removal of confidence threshold flag
- Minimum golang version increase
I suggest we target creating a v2 of go-licenses. What do you think?
I agree, the upstream |
save.go
Outdated
| } | ||
| switch licenseType { | ||
|
|
||
| mostRestrictive := licenses.Unknown |
There was a problem hiding this comment.
Should unknown be the most restrictive? because it results in an error. No matter what you do, you cannot be sure you are conformant to the license.
There was a problem hiding this comment.
Also, the code here should better be extracted to the licenses folder.
There was a problem hiding this comment.
@Bobgy I fixed these issues in the latest commit.
|
Incredible work! Thank you so much for improving go licenses! If we resolve the open issues we can merge and bump to v2 in another PR. |
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Bobgy
left a comment
There was a problem hiding this comment.
Thank you! One last comment.
Purely a bonus -- if you want, it's also helpful to check if there are missing code coverage for those you touched, but do not expect to change the behavior.
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Bobgy
left a comment
There was a problem hiding this comment.
Absolutely amazing work!
Thank you so much for your contribution!
Upgraded all dependencies (go.mod, vendored and licenseclassifier/v2).
This PR includes added support for multiple licenses in one LICENSE file (prints all of the found licenses).
NOTE: this PR removes the
confidenceThresholdparameter, as it is not directly supported upstream anymore