Skip to content

free-unknown should be dismissed as license clues when there are other proper detections in the file #4361

Open
@chinyeungli

Description

@chinyeungli
This plugin was created in [Realytics](https://www.realytics.io/) in 2017. Thank you for supporting Open Source.

## License

MIT License

License detection yeilds free-unknown AND mit for the above text.

The free-unknown is from

"license_expression": "free-unknown",
"license_expression_spdx": "LicenseRef-scancode-free-unknown",
"from_file": "code/fork-ts-checker-webpack-plugin-6.5.3.tgz-extract/package/README.md",
"start_line": 434,
"end_line": 436,
"matcher": "2-aho",
"score": 50,
"matched_length": 3,
"match_coverage": 100,
"rule_relevance": 50,
"rule_identifier": "free-unknown_88.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown_88.RULE",
"matched_text": "Open Source.\n\n## License",
"matched_text_diagnostics": "Open Source.\n\n## License"

Another sample:
busybox-1.37.0/networking/ssl_helper/ssl_helper.c

    - score: '100.0'
      matcher: 2-aho
      end_line: 8
      rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown_7.RULE
      from_file:
      start_line: 8
      matched_text: ' * This software is open source; you can redistribute it and/or modify'
      match_coverage: '100.0'
      matched_length: 5
      rule_relevance: 100
      rule_identifier: free-unknown_7.RULE
      license_expression: free-unknown
      license_expression_spdx: LicenseRef-scancode-free-unknown
    - score: '94.06'
      matcher: 3-seq
      end_line: 19
      rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_573.RULE
      from_file:
      start_line: 8
      matched_text: |
         * This software is open source; you can redistribute it and/or modify
         * it under the terms of the GNU General Public License as published by
         * the Free Software Foundation; either version 2 of the License, or
         * (at your option) any later version.
         *
         * This program is distributed in WITHOUT ANY WARRANTY; without even the
         * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
         * See the GNU General Public License for more details.
         *
         * You should have received a copy of the GNU General Public License
         * along with this program; if not, write to the Free Software
         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      match_coverage: '94.06'
      matched_length: 95
      rule_relevance: 100
      rule_identifier: gpl-2.0-plus_573.RULE
      license_expression: gpl-2.0-plus
      license_expression_spdx: GPL-2.0-or-later

The free-unknown is detected from the same starting line of the detected gpl-2.0-plus license notice.

It'll be great if it can remove the free-unknown from the detection to prevent noise.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions