Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new rule for mit #4121

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alok1304
Copy link

@alok1304 alok1304 commented Jan 25, 2025

Now we detects the correct license expression i.e mit.

Fixes #3860
Fixes #3861

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: Alok Kumar [email protected]

@alok1304
Copy link
Author

alok1304 commented Jan 25, 2025

@pombredanne can you please review this PR, Now there is no bug. We detects correct mit license Expression.

Eg:

  "files": [
    {
      "path": "_context.py",
      "type": "file",
      "detected_license_expression": "mit",
      "detected_license_expression_spdx": "MIT",
      "license_detections": [
        {
          "license_expression": "mit",
          "license_expression_spdx": "MIT",
          "matches": [
            {
              "license_expression": "mit",
              "license_expression_spdx": "MIT",
              "from_file": "_context.py",
              "start_line": 2,
              "end_line": 2,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 10,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "mit_1351.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_1351.RULE",
              "matched_text": "# MIT License (see LICENSE or https://opensource.org/licenses/MIT)",
              "matched_text_diagnostics": "MIT License (see LICENSE or https://opensource.org/licenses/MIT)"
            }
          ],
          "identifier": "mit-cf1210d2-5820-2542-c850-cac164e24fed"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 0.24,
      "scan_errors": []
    }
  ]

This new rule fixes two bugs that are facing in #3861 and #3860.

Hope this helps.

@alok1304 alok1304 changed the title New rule for mit Add new rule for mit Jan 25, 2025
@alok1304 alok1304 force-pushed the new_rule_for_mit branch 5 times, most recently from e6d3797 to 900b882 Compare January 25, 2025 11:48
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.

MIT reported as "CC-BY-3.0 AND MIT" MIT reported as "GPL-3.0-or-later OR MIT"
1 participant