nexB / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://github.com/nexB/scancode-toolkit/releases/
2.02k stars 533 forks source link

Improve License Clarity at Top Package Level #3792

Open swastkk opened 1 month ago

swastkk commented 1 month ago

Fixes https://github.com/nexB/scancode-toolkit/issues/3802

Tasks

AyanSinhaMahapatra commented 2 weeks ago

@swastkk this is not correct atm:

  1. why use license_clarity and not license_clarity_score? This is what we use on the summery option.
  2. We want this new attribute license_clarity_score added to top-level packages if and only if the --package-summary option is used, and not in every package like you have here.

This new plugin could be there in packagedcode/plugin_package.py possibly, as we need to check if this option is enabled or not in process_codebase step for the package plugin, and then this should be passed on below to package.to_dict() fucntion for the same.