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 public domain license #4127

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

Conversation

alok1304
Copy link

@alok1304 alok1304 commented Feb 2, 2025

Fixes #3997

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 alok1304 force-pushed the add_new_rule_for_public-domain branch from 92d6b35 to af36c8d Compare February 2, 2025 18:28
@alok1304
Copy link
Author

alok1304 commented Feb 2, 2025

Now, we detects the correct license expression.

"files": [
    {
      "path": "pom.xml",
      "type": "file",
      "detected_license_expression": "public-domain",
      "detected_license_expression_spdx": "LicenseRef-scancode-public-domain",
      "license_detections": [
        {
          "license_expression": "public-domain",
          "license_expression_spdx": "LicenseRef-scancode-public-domain",
          "matches": [
            {
              "license_expression": "public-domain",
              "license_expression_spdx": "LicenseRef-scancode-public-domain",
              "from_file": "pom.xml",
              "start_line": 36,
              "end_line": 42,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 22,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "public-domain_537.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/public-domain_537.RULE",
              "matched_text": "    <licenses>\r\n        <license>\r\n            <name>Public Domain</name>\r\n            <url>https://github.com/stleary/JSON-java/blob/master/LICENSE</url>\r\n            <distribution>repo</distribution>\r\n        </license>\r\n    </licenses>",
              "matched_text_diagnostics": "licenses>\r\n        <license>\r\n            <name>Public Domain</name>\r\n            <url>https://github.com/stleary/JSON-java/blob/master/LICENSE</url>\r\n            <distribution>repo</distribution>\r\n        </license>\r\n    </licenses>"
            }
          ],
          "identifier": "public_domain-208c1387-6950-7abe-1990-a436120d6de1"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 4.2,
      "scan_errors": []
    }
  ]

@AyanSinhaMahapatra can you review this PR, simply I add a new rule for public-domain.

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.

License is not being detected
1 participant