-
-
Notifications
You must be signed in to change notification settings - Fork 614
Open
@pombredanne
Description
Following up from comments posted in @alok1304 's #4121 (comment)_
You can improve this further this way:
- create tests adding a test and expected file in https://github.com/aboutcode-org/scancode-toolkit/tree/develop/tests/licensedcode/data/datadriven/lic4 ... see all examples of test file pairs there.
The test for #3860 and #3861 would be the same with this text (like for https://github.com/aboutcode-org/scancode-toolkit/blob/develop/tests/licensedcode/data/datadriven/lic4/2675-sqlite.cpp )
# Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
And expected YAML file, (like for https://github.com/aboutcode-org/scancode-toolkit/blob/develop/tests/licensedcode/data/datadriven/lic4/2675-sqlite.cpp.yml )
license_expressions:
- mit
- Also add a few new rules with this related contents (this can be a separate PR alright):
---
license_expression: mit
is_license_notice: yes
relevance: 100
referenced_filenames:
- LICENSE
ignorable_urls:
- https://opensource.org/licenses/MIT
---
{{MIT License (see LICENSE or https://opensource.org/licenses/MIT) }}
And another:
---
license_expression: mit
is_license_notice: yes
relevance: 100
referenced_filenames:
- LICENSE
---
{{MIT License (see LICENSE) }}
And a few variations that can bee seen in the wild if we do not detect these exactly:
- Search for .MD variants: https://github.com/search?q="MIT+License+(see+LICENSE.md)"&type=code
MIT License (see LICENSE.md)distributed under MIT license (see LICENSE.md).https://github.com/modeladonicho/Maxent/blob/a500e9108e7edeeea8558cd8ed43e622bedc410d/license-summary.txt#L1- https://github.com/zeux/meshoptimizer/blob/58b0ff55c04c650c873409c0f557e7810a1f1a35/README.md?plain=1#L598
- https://github.com/search?q="MIT+License+(see+LICENSE.md)"&type=code
- https://github.com/benderjs/benderjs/blob/39c2159d882d0837ddbfd7b8a19a2ce39738f75a/lib/constants.js#L3
- https://github.com/inunix3/rxpipes/blob/d99c35f2d1d5f623f07c9b74356015480e557a1c/src/pipe.rs#L3
- https://github.com/marcusschiesser/openbahn-api/blob/9f50b34293837bd0afe8e31c93e3911c06524b7e/README.md?plain=1#L14
- https://github.com/GrenDrake/glulx-assemble/blob/213a452d186be4fbe9ad449f2de2249244e6b483/demos/minimal.ga#L7
- https://github.com/iddev5/cobalt/blob/0de6c1600bad5213ec8d053e654300bf54a2b721/cobalt#L5
- https://github.com/LAiSR-SK/AiRobustnessTestingKit-AiR-TK-/blob/39b0632e55bd3768267f8451c76f532cbe79ca3a/src/airtk/__init__.py#L2
- https://github.com/Stevie-O/delayed-ldr-controlled-led/blob/fbbeb26ab969cdd0135812ea2c100e13adaa962b/ldrmon.h#L8
- https://github.com/mlewand/benderjs-yui/blob/c7112ada1af11823cc4d5b89f12c666add027c07/lib/index.js#L3
- https://github.com/jcoliz/defender-endpoint-samples/blob/3f32a2c7fa6ee9de7210aaace33710b1487da80d/hello-world/Program.cs#L2
- https://github.com/anmarques/CLoVER/blob/71996b3cda3e91ecd9696d89d6a088215062e203/source/GP.py#L6
- https://github.com/zeux/meshoptimizer/blob/58b0ff55c04c650c873409c0f557e7810a1f1a35/README.md?plain=1#L598
And all the variations where there is a LICENSE.txt:
And a few rst:
And more variants: