Skip to content

Commit c540cdf

Browse files
Update test expectations with top level licenses
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 2d576ab commit c540cdf

File tree

58 files changed

+13157
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+13157
-3
lines changed

tests/cluecode/data/plugin_filter_clues/filtered-expected.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,52 @@
11
{
2+
"licenses": [
3+
{
4+
"identifier": "81b019ea-ed6c-17e3-1cfc-fad8557f8cac",
5+
"license_expression": "apache-1.1",
6+
"occurance_count": 1,
7+
"detection_log": [
8+
"not-combined"
9+
],
10+
"matches": [
11+
{
12+
"score": 96.07,
13+
"start_line": 7,
14+
"end_line": 70,
15+
"matched_length": 367,
16+
"match_coverage": 100.0,
17+
"matcher": "3-seq",
18+
"license_expression": "apache-1.1",
19+
"rule_identifier": "apache-1.1_63.RULE",
20+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-1.1_63.RULE",
21+
"referenced_filenames": [],
22+
"is_license_text": true,
23+
"is_license_notice": false,
24+
"is_license_reference": false,
25+
"is_license_tag": false,
26+
"is_license_intro": false,
27+
"rule_length": 367,
28+
"rule_relevance": 100,
29+
"licenses": [
30+
{
31+
"key": "apache-1.1",
32+
"name": "Apache License 1.1",
33+
"short_name": "Apache 1.1",
34+
"category": "Permissive",
35+
"is_exception": false,
36+
"is_unknown": false,
37+
"owner": "Apache Software Foundation",
38+
"homepage_url": "http://www.apache.org/licenses/",
39+
"text_url": "http://apache.org/licenses/LICENSE-1.1",
40+
"reference_url": "https://scancode-licensedb.aboutcode.org/apache-1.1",
41+
"scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-1.1.LICENSE",
42+
"spdx_license_key": "Apache-1.1",
43+
"spdx_url": "https://spdx.org/licenses/Apache-1.1"
44+
}
45+
]
46+
}
47+
]
48+
}
49+
],
250
"files": [
351
{
452
"path": "LICENSE",
@@ -69,6 +117,9 @@
69117
],
70118
"license_clues": [],
71119
"percentage_of_license_text": 92.44,
120+
"for_licenses": [
121+
"81b019ea-ed6c-17e3-1cfc-fad8557f8cac"
122+
],
72123
"copyrights": [
73124
{
74125
"copyright": "Copyright (c) The Eclipse Foundation https://eclipse.org",

tests/cluecode/data/plugin_filter_clues/filtered-expected2.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,52 @@
11
{
2+
"licenses": [
3+
{
4+
"identifier": "7b7e2330-4841-998b-3287-06b5bc6e5a90",
5+
"license_expression": "pygres-2.2",
6+
"occurance_count": 1,
7+
"detection_log": [
8+
"not-combined"
9+
],
10+
"matches": [
11+
{
12+
"score": 100.0,
13+
"start_line": 7,
14+
"end_line": 22,
15+
"matched_length": 145,
16+
"match_coverage": 100.0,
17+
"matcher": "2-aho",
18+
"license_expression": "pygres-2.2",
19+
"rule_identifier": "pygres-2.2_2.RULE",
20+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pygres-2.2_2.RULE",
21+
"referenced_filenames": [],
22+
"is_license_text": true,
23+
"is_license_notice": false,
24+
"is_license_reference": false,
25+
"is_license_tag": false,
26+
"is_license_intro": false,
27+
"rule_length": 145,
28+
"rule_relevance": 100,
29+
"licenses": [
30+
{
31+
"key": "pygres-2.2",
32+
"name": "PyGres License v2.2",
33+
"short_name": "PyGres License 2.2",
34+
"category": "Permissive",
35+
"is_exception": false,
36+
"is_unknown": false,
37+
"owner": "Unspecified",
38+
"homepage_url": null,
39+
"text_url": "http://shell.vex.net/viewvc.cgi/pygresql/trunk/module/pgmodule.c?view=markup&pathrev=431",
40+
"reference_url": "https://scancode-licensedb.aboutcode.org/pygres-2.2",
41+
"scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.LICENSE",
42+
"spdx_license_key": "LicenseRef-scancode-pygres-2.2",
43+
"spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.LICENSE"
44+
}
45+
]
46+
}
47+
]
48+
}
49+
],
250
"files": [
351
{
452
"path": "LICENSE2",
@@ -69,6 +117,9 @@
69117
],
70118
"license_clues": [],
71119
"percentage_of_license_text": 69.38,
120+
"for_licenses": [
121+
"7b7e2330-4841-998b-3287-06b5bc6e5a90"
122+
],
72123
"copyrights": [
73124
{
74125
"copyright": "Copyright (c) 1996, Pascal Andre (andre@avia.ecp.fr)",

tests/cluecode/data/plugin_filter_clues/filtered-expected3.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,52 @@
11
{
2+
"licenses": [
3+
{
4+
"identifier": "043db187-9376-d7a9-e89b-d027667acb34",
5+
"license_expression": "pcre",
6+
"occurance_count": 1,
7+
"detection_log": [
8+
"not-combined"
9+
],
10+
"matches": [
11+
{
12+
"score": 100.0,
13+
"start_line": 1,
14+
"end_line": 47,
15+
"matched_length": 303,
16+
"match_coverage": 100.0,
17+
"matcher": "1-hash",
18+
"license_expression": "pcre",
19+
"rule_identifier": "pcre.LICENSE",
20+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pcre.LICENSE",
21+
"referenced_filenames": [],
22+
"is_license_text": true,
23+
"is_license_notice": false,
24+
"is_license_reference": false,
25+
"is_license_tag": false,
26+
"is_license_intro": false,
27+
"rule_length": 303,
28+
"rule_relevance": 100,
29+
"licenses": [
30+
{
31+
"key": "pcre",
32+
"name": "PCRE License",
33+
"short_name": "PCRE License",
34+
"category": "Permissive",
35+
"is_exception": false,
36+
"is_unknown": false,
37+
"owner": "University of Cambridge",
38+
"homepage_url": "http://www.pcre.org/licence.txt",
39+
"text_url": "http://www.pcre.org/licence.txt",
40+
"reference_url": "https://scancode-licensedb.aboutcode.org/pcre",
41+
"scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pcre.LICENSE",
42+
"spdx_license_key": "LicenseRef-scancode-pcre",
43+
"spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pcre.LICENSE"
44+
}
45+
]
46+
}
47+
]
48+
}
49+
],
250
"files": [
351
{
452
"path": "LICENSE3",
@@ -69,6 +117,9 @@
69117
],
70118
"license_clues": [],
71119
"percentage_of_license_text": 100.0,
120+
"for_licenses": [
121+
"043db187-9376-d7a9-e89b-d027667acb34"
122+
],
72123
"copyrights": [
73124
{
74125
"copyright": "Copyright (c) 1997-2001 University of Cambridge",

tests/formattedcode/data/json/simple-expected.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"licenses": [],
23
"dependencies": [],
34
"packages": [],
45
"files": [
@@ -26,6 +27,7 @@
2627
"license_detections": [],
2728
"license_clues": [],
2829
"percentage_of_license_text": 0,
30+
"for_licenses": [],
2931
"copyrights": [],
3032
"holders": [],
3133
"authors": [],
@@ -60,6 +62,7 @@
6062
"license_detections": [],
6163
"license_clues": [],
6264
"percentage_of_license_text": 0,
65+
"for_licenses": [],
6366
"copyrights": [
6467
{
6568
"copyright": "Copyright (c) 2000 ACME, Inc.",

tests/formattedcode/data/json/simple-expected.jsonpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"licenses": [],
23
"dependencies": [],
34
"packages": [],
45
"files": [
@@ -26,6 +27,7 @@
2627
"license_detections": [],
2728
"license_clues": [],
2829
"percentage_of_license_text": 0,
30+
"for_licenses": [],
2931
"copyrights": [],
3032
"holders": [],
3133
"authors": [],
@@ -60,6 +62,7 @@
6062
"license_detections": [],
6163
"license_clues": [],
6264
"percentage_of_license_text": 0,
65+
"for_licenses": [],
6366
"copyrights": [
6467
{
6568
"copyright": "Copyright (c) 2000 ACME, Inc.",

tests/formattedcode/data/yaml/simple-expected.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@ headers:
1414
for any legal advice.
1515
ScanCode is a free software code scanning tool from nexB Inc. and others.
1616
Visit https://github.com/nexB/scancode-toolkit/ for support and download.
17-
output_format_version: 2.0.0
17+
output_format_version: 3.0.0
1818
message:
1919
errors: []
2020
warnings: []
2121
extra_data:
2222
system_environment:
2323
operating_system: linux
2424
cpu_architecture: 64
25-
platform: Linux-5.14.0-1045-oem-x86_64-with-glibc2.29
26-
platform_version: '#51-Ubuntu SMP Mon Jul 4 06:41:22 UTC 2022'
25+
platform: Linux-5.14.0-1054-oem-x86_64-with-glibc2.29
26+
platform_version: '#61-Ubuntu SMP Fri Oct 14 13:05:50 UTC 2022'
2727
python_version: "3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]"
2828
spdx_license_list_version: '3.17'
2929
files_count: 1
30+
licenses: []
3031
dependencies: []
3132
packages: []
3233
files:
@@ -53,6 +54,7 @@ files:
5354
license_detections: []
5455
license_clues: []
5556
percentage_of_license_text: '0'
57+
for_licenses: []
5658
copyrights: []
5759
holders: []
5860
authors: []
@@ -85,6 +87,7 @@ files:
8587
license_detections: []
8688
license_clues: []
8789
percentage_of_license_text: '0'
90+
for_licenses: []
8891
copyrights:
8992
- copyright: Copyright (c) 2000 ACME, Inc.
9093
start_line: 1

0 commit comments

Comments
 (0)