pana icon indicating copy to clipboard operation
pana copied to clipboard

Support dual licensing in detection and expose it in the report.

Open isoos opened this issue 3 years ago • 5 comments

isoos avatar Dec 14 '21 20:12 isoos

Reddit discussion: https://www.reddit.com/r/dartlang/comments/rgfhg8/duallicensed_dart_package/

isoos avatar Dec 16 '21 08:12 isoos

@isoos The current license detector already supports multiple license detection. It's just that while displaying it on pub,dev we only take the license with the highest confidence and ignore the others. For example, if we see the output generated by the license_detector_bin.dart for some of the plugins on the pub.dev that have more than one license we can see both of them are being detected. I have attached a screenshot below. Plugins in screenshot"

Another example with a file having 4 licenses image

But here while displaying it, we are just considering the first match. Maybe we can return a list here and also add a condition like the percentage of tokens claimed by all matches is greater than 0.8 or 0.9 to ensure it's not spam.

bharat-biradar avatar Dec 21 '21 07:12 bharat-biradar

How about being able to use an SPDX identifier in the pubspec.yaml file (like MIT OR Apache-2.0) and then check if the license(s) are provided in the LICENSE file (or somewhere else)? This could also deal with the problem that the automatic detection sometimes can't determine the correct license when multiple ones (e. g. from third party software) are contained in the LICENSE file.

JKRhb avatar Jan 19 '22 22:01 JKRhb

We would be happy to have volunteers help with this.

sigurdm avatar Feb 03 '22 10:02 sigurdm

With the new licenses field in the Summary the first two package has been identified correctly (mvc_pattern, allnotification).

isoos avatar Apr 13 '22 12:04 isoos