Repository navigation
fix: deprecate proprietary-license rules in favor of hessla - #5538
Open
chinyeungli wants to merge 5 commits into
Open
chinyeungli wants to merge 5 commits into
chinyeungli wants to merge 5 commits into
Conversation
|
Hi, I looked into the two failing jobs on this PR ( |
Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
…ate `is_license_text: yes` to `is_license_intro: yes` #4885 Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
chinyeungli
force-pushed
the
4885_propruetary_lic_to_HESSLA
branch
from
November 24, 2026 10:43
e94f3d2 to
7318c47
Compare
Signed-off-by: Chin Yeung Li <tli@nexb.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4885
This PR adds two extra fields to
proprietary-license_87.RULEandproprietary-license_597.RULE, as these two rules were mistakenly identified asproprietary-license. The correct license should behessla.In addition, I added two new rules,
hessla_1.RULEandhessla_2.RULE, which capture the introductory statement.These are the only differences:
Result
I used the license text from
proprietary-license_597.RULEandproprietary-license_87.RULEto 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
Run tests locally to check for errors.
Signed-off-by: Chin Yeung Li tli@nexb.com