Skip to content

fix: deprecate proprietary-license rules in favor of hessla - #5538

Open
chinyeungli wants to merge 2 commits into
developfrom
4885_propruetary_lic_to_HESSLA
Open

chinyeungli wants to merge 2 commits into
developfrom
4885_propruetary_lic_to_HESSLA

Conversation

@chinyeungli

Copy link
Copy Markdown
Contributor

Fixes #4885

This PR adds two extra fields to proprietary-license_87.RULE and proprietary-license_597.RULE, as these two rules were mistakenly identified as proprietary-license. The correct license should be hessla.

is_deprecated: yes
replaced_by:
    - hessla

In addition, I added two new rules, hessla_1.RULE and hessla_2.RULE, which capture the introductory statement.

These are the only differences:

$ diff hessla_1.RULE hessla_2.RULE
8a9
>     - http://www.gnu.org/philosophy/free-sw.html
14d14
<     - https://www.gnu.org/philosophy/free-sw.html
59c59
< [fn11] https://www.gnu.org/philosophy/free-sw.html
---
> [fn11] http://www.gnu.org/philosophy/free-sw.html

Result

I used the license text from proprietary-license_597.RULE and proprietary-license_87.RULE to create "proprietary-lic-597.txt" and "proprietary-lic-87.txt" to test the detection.

The scan is now correctly detected the license as hessla

    {
      "path": "tmp/proprietary-lic-597.txt",
      "type": "file",
      "detected_license_expression": "hessla",
      "detected_license_expression_spdx": "LicenseRef-scancode-hessla",
      "license_detections": [
        {
          "license_expression": "hessla",
          "license_expression_spdx": "LicenseRef-scancode-hessla",
          "matches": [
            {
              "license_expression": "hessla",
              "license_expression_spdx": "LicenseRef-scancode-hessla",
              "from_file": "tmp/proprietary-lic-597.txt",
              "start_line": 1,
              "end_line": 129,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 5698,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "hessla_1.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/hessla_1.RULE"
            },
            {
              "license_expression": "hessla",
              "license_expression_spdx": "LicenseRef-scancode-hessla",
              "from_file": "tmp/proprietary-lic-597.txt",
              "start_line": 131,
              "end_line": 327,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 8434,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "hessla.LICENSE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/hessla.LICENSE"
            }
          ],
          "identifier": "hessla-b1c0c1a8-62db-2e47-05f5-f6aa7ffe5eb7"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 100.0,
      "scan_errors": []
    },
    {
      "path": "tmp/proprietary-lic-87.txt",
      "type": "file",
      "detected_license_expression": "hessla",
      "detected_license_expression_spdx": "LicenseRef-scancode-hessla",
      "license_detections": [
        {
          "license_expression": "hessla",
          "license_expression_spdx": "LicenseRef-scancode-hessla",
          "matches": [
            {
              "license_expression": "hessla",
              "license_expression_spdx": "LicenseRef-scancode-hessla",
              "from_file": "tmp/proprietary-lic-87.txt",
              "start_line": 1,
              "end_line": 129,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 5698,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "hessla_2.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/hessla_2.RULE"
            },
            {
              "license_expression": "hessla",
              "license_expression_spdx": "LicenseRef-scancode-hessla",
              "from_file": "tmp/proprietary-lic-87.txt",
              "start_line": 131,
              "end_line": 327,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 8434,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "hessla.LICENSE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/hessla.LICENSE"
            }
          ],
          "identifier": "hessla-bc6119b0-bc05-53d7-c59a-edc2236059d8"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 100.0,
      "scan_errors": []
    }

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Chin Yeung Li tli@nexb.com

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename proprietary-license_87 and proprietary-license_597 to HESSLA

1 participant