aboutcode-org / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://github.com/aboutcode-org/scancode-toolkit/releases/
2.11k stars 546 forks source link

Missing copyright from LICENSE file (platformdirs 3.0.0) #3875

Open vw-anton opened 3 months ago

vw-anton commented 3 months ago

Description

If we run ScanCode for https://github.com/platformdirs/platformdirs/tree/3.0.0/ we expect to find the copyright from https://github.com/platformdirs/platformdirs/blob/3.0.0/LICENSE which is: Copyright (c) 2010-202x The platformdirs developers however the result is empty.

ScanCode output:

{
      "path": "codebase/platformdirs-3.0.0/LICENSE",
      "type": "file",
      "name": "LICENSE",
      "base_name": "LICENSE",
      "extension": "",
      "size": 1089,
      "date": "2023-02-06",
      "sha1": "f511a8a63af8c6e36004b593478436bbc560ee0c",
      "md5": "ea4f5a41454746a9ed111e3d8723d17a",
      "sha256": "29e0fd62e929850e86eb28c3fdccf0cefdf4fa94879011cffb3d0d4bed6d4db6",
      "mime_type": "text/plain",
      "file_type": "ASCII text",
      "programming_language": null,
      "is_binary": false,
      "is_text": true,
      "is_archive": false,
      "is_media": false,
      "is_source": false,
      "is_script": false,
      "package_data": [],
      "for_packages": [],
      "is_legal": true,
      "is_manifest": false,
      "is_readme": false,
      "is_top_level": true,
      "is_key_file": true,
      "detected_license_expression": "mit",
      "detected_license_expression_spdx": "MIT",
      "license_detections": [
        {
          "license_expression": "mit",
          "license_expression_spdx": "MIT",
          "matches": [
            {
              "license_expression": "mit",
              "spdx_license_expression": "MIT",
              "from_file": "codebase/platformdirs-3.0.0/LICENSE",
              "start_line": 1,
              "end_line": 1,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 2,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "mit_14.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE",
              "matched_text": "MIT License"
            },
            {
              "license_expression": "mit",
              "spdx_license_expression": "MIT",
              "from_file": "codebase/platformdirs-3.0.0/LICENSE",
              "start_line": 5,
              "end_line": 21,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 161,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "mit.LICENSE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE",
              "matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
            }
          ],
          "identifier": "mit-ac40beba-5702-f54d-755f-333441314bb0"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 95.88,
      "copyrights": [],
      "holders": [],
      "authors": [],
      "emails": [],
      "urls": [],
      "files_count": 0,
      "dirs_count": 0,
      "size_count": 0,
      "scan_errors": []
    }

How To Reproduce

Run scancode.io

System configuration

"headers": [
    {
      "tool_name": "scancode-toolkit",
      "tool_version": "32.1.0",
      "options": {
        "--copyright": true,
        "--email": true,
        "--info": true,
        "--license": true,
        "--license-text": true,
        "--package": true,
        "--url": true,
        "--classify": true,
        "--summary": true
      },
      "start_timestamp": "2024-07-29T112516.485236",
      "end_timestamp": "2024-07-29T112526.623935",
      "output_format_version": "3.1.0",
      "duration": 10.138794660568237,
      "message": null,
      "errors": [],
      "warnings": [],
      "extra_data": {
        "system_environment": {
          "operating_system": "linux",
          "cpu_architecture": "64",
          "platform": "Linux-6.6.32-linuxkit-x86_64-with-glibc2.36",
          "platform_version": "#1 SMP PREEMPT_DYNAMIC Thu Jun 13 14:14:43 UTC 2024",
          "python_version": "3.12.2 (main, Mar 12 2024, 11:13:18) [GCC 12.2.0]"
        },
        "spdx_license_list_version": "3.23",
        "files_count": 34
      }
    }
Ripoohann commented 2 months ago

Hi I am new to contributions and would Like to work on this issue