Skip to content

LicenseRef not always generated #1328

Description

@sschuberth

As of #1307 I would have expected any license finding in a ScanCode result file to have the spdx_license_key field populated: If it is a license known to the SPDX standard that field should contain the SPDX ID, and if the license is not known to the SPDX standard that field should contain the value of the key field prefixed by LicenseRef-scancode-.

Is this understanding wrong?

Because running

scancode --license src\licensedcode\data\licenses\indiana-extreme.LICENSE --json-pp -

(on Windows with ScanCode 2.9.9.post2.a7b8c4fa0) results in

      "key": "indiana-extreme",
      "score": 100.0,
      "name": "Indiana University Extreme! Lab Software License Version 1.1.1",
      "short_name": "Indiana Extreme License 1.1.1",
      "category": "Permissive",
      "is_exception": false,
      "owner": "Indiana University",
      "homepage_url": "",
      "text_url": "http://www.bearcave.com/software/java/xml/xmlpull_license.html",
      "reference_url": "https://enterprise.dejacode.com/urn/urn:dje:license:indiana-extreme",
      "spdx_license_key": "",
      "spdx_url": "",

i.e. the spdx_license_key field is empty. I wonder whether that is because the check at

https://github.com/nexB/scancode-toolkit/blob/a7b8c4fa001b95dd215cd6d95313f5c96d8dafdd/src/formattedcode/output_spdx.py#L248-L252

should be enhanced to also handle empty strings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions