Skip to content

Resolve unknown-license-reference to LICENSE files which are beside the package manifest  #4362

Description

@chinyeungli

Following are cases where unknowm-license-reference is detected on the same line as another detected license.

{
  "license_expression": "mit",
  "license_expression_spdx": "MIT",
  "from_file": "code/vite-5.2.11.tgz-extract/package/dist/node/chunks/dep-cNe07EU9.js",
  "start_line": 13969,
  "end_line": 13969,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 3,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "mit_172.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_172.RULE",
  "matched_text": "licensed under MIT,",
  "matched_text_diagnostics": "licensed under MIT,"
},
{
  "license_expression": "unknown-license-reference",
  "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
  "from_file": "code/vite-5.2.11.tgz-extract/package/dist/node/chunks/dep-cNe07EU9.js",
  "start_line": 13969,
  "end_line": 13969,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 2,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "unknown-license-reference_see-license_1.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see-license_1.RULE",
  "matched_text": "see ../LICENSE",
  "matched_text_diagnostics": "see ../LICENSE"
}

Line 13969

licensed under MIT, see ../LICENSE
{
  "license_expression": "unknown-license-reference",
  "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
  "from_file": "code/dom-9.3.4.tgz-extract/package/dist/@testing-library/dom.umd.js",
  "start_line": 15083,
  "end_line": 15083,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 5,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "unknown-license-reference_303.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_303.RULE",
  "matched_text": "For more information see LICENSE.",
  "matched_text_diagnostics": "For more information see LICENSE."
},
{
  "license_expression": "wtfpl-2.0",
  "license_expression_spdx": "WTFPL",
  "from_file": "code/dom-9.3.4.tgz-extract/package/dist/@testing-library/dom.umd.js",
  "start_line": 15083,
  "end_line": 15083,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 3,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "wtfpl-2.0_27.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/wtfpl-2.0_27.RULE",
  "matched_text": "www.wtfpl.net/",
  "matched_text_diagnostics": "www.wtfpl.net/"
}

Line 15083

For more information see LICENSE.txt or http://www.wtfpl.net/
{
  "license_expression": "bsd-new",
  "license_expression_spdx": "BSD-3-Clause",
  "from_file": "code/html-minifier-terser-7.2.0.tgz-extract/package/dist/htmlminifier.esm.bundle.js",
  "start_line": 20808,
  "end_line": 20808,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 6,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "bsd-new_281.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_281.RULE",
  "matched_text": "Licensed under the New BSD license.",
  "matched_text_diagnostics": "Licensed under the New BSD license."
},
{
  "license_expression": "unknown-license-reference",
  "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
  "from_file": "code/html-minifier-terser-7.2.0.tgz-extract/package/dist/htmlminifier.esm.bundle.js",
  "start_line": 20808,
  "end_line": 20808,
  "matcher": "2-aho",
  "score": 90,
  "matched_length": 3,
  "match_coverage": 100,
  "rule_relevance": 90,
  "rule_identifier": "unknown-license-reference_46.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_46.RULE",
  "matched_text": "See LICENSE.txt",
  "matched_text_diagnostics": "See LICENSE.txt"
}

Line 20808

Licensed under the New BSD license. See LICENSE.txt or:
{
  "license_expression": "unknown-license-reference",
  "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
  "from_file": "code/security-agent-2.0.0.tgz-extract/package/THIRD_PARTY_NOTICES.md",
  "start_line": 485,
  "end_line": 485,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 3,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "license-intro_59.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_59.RULE",
  "matched_text": "distributed under the [",
  "matched_text_diagnostics": "distributed under the ["
},
{
  "license_expression": "isc",
  "license_expression_spdx": "ISC",
  "from_file": "code/security-agent-2.0.0.tgz-extract/package/THIRD_PARTY_NOTICES.md",
  "start_line": 485,
  "end_line": 485,
  "matcher": "2-aho",
  "score": 100,
  "matched_length": 4,
  "match_coverage": 100,
  "rule_relevance": 100,
  "rule_identifier": "isc_49.RULE",
  "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/isc_49.RULE",
  "matched_text": "under the [ISC License](",
  "matched_text_diagnostics": "under the [ISC License]("
}

Line 485

This product includes source derived from [semver](https://github.com/npm/node-semver) ([v7.5.4](https://github.com/npm/node-semver/tree/v7.5.4)), distributed under the [ISC License]

It'll be great if this noise, if it is, can be removed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions