Skip to content

Commit 6a91773

Browse files
Regenerate test expectations for LicenseDetection
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent cc945a0 commit 6a91773

File tree

61 files changed

+19393
-17584
lines changed

Some content is hidden

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

61 files changed

+19393
-17584
lines changed

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

Lines changed: 77 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,4 @@
11
{
2-
"headers": [
3-
{
4-
"tool_name": "scancode-toolkit",
5-
"options": {
6-
"input": "<path>",
7-
"--copyright": true,
8-
"--email": true,
9-
"--filter-clues": true,
10-
"--info": true,
11-
"--json": "<file>",
12-
"--license": true,
13-
"--url": true
14-
},
15-
"notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
16-
"output_format_version": "2.0.0",
17-
"message": null,
18-
"errors": [],
19-
"warnings": [],
20-
"extra_data": {
21-
"system_environment": {
22-
"operating_system": "linux",
23-
"cpu_architecture": "64",
24-
"platform": "Linux-5.4.0-109-generic-x86_64-with-Ubuntu-18.04-bionic",
25-
"platform_version": "#123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022",
26-
"python_version": "3.6.9 (default, Mar 15 2022, 13:55:28) \n[GCC 8.4.0]"
27-
},
28-
"spdx_license_list_version": "3.16",
29-
"files_count": 1
30-
}
31-
}
32-
],
332
"files": [
343
{
354
"path": "LICENSE",
@@ -52,58 +21,79 @@
5221
"is_script": false,
5322
"licenses": [
5423
{
55-
"key": "apache-1.1",
56-
"score": 96.07,
57-
"name": "Apache License 1.1",
58-
"short_name": "Apache 1.1",
59-
"category": "Permissive",
60-
"is_exception": false,
61-
"is_unknown": false,
62-
"owner": "Apache Software Foundation",
63-
"homepage_url": "http://www.apache.org/licenses/",
64-
"text_url": "http://apache.org/licenses/LICENSE-1.1",
65-
"reference_url": "https://scancode-licensedb.aboutcode.org/apache-1.1",
66-
"scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-1.1.LICENSE",
67-
"scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-1.1.yml",
68-
"spdx_license_key": "Apache-1.1",
69-
"spdx_url": "https://spdx.org/licenses/Apache-1.1",
70-
"start_line": 7,
71-
"end_line": 70,
72-
"matched_rule": {
73-
"identifier": "apache-1.1_63.RULE",
74-
"license_expression": "apache-1.1",
75-
"licenses": [
76-
"apache-1.1"
77-
],
78-
"referenced_filenames": [],
79-
"is_license_text": true,
80-
"is_license_notice": false,
81-
"is_license_reference": false,
82-
"is_license_tag": false,
83-
"is_license_intro": false,
84-
"has_unknown": false,
85-
"matcher": "3-seq",
86-
"rule_length": 367,
87-
"matched_length": 367,
88-
"match_coverage": 100.0,
89-
"rule_relevance": 100
90-
}
24+
"license_expression": "apache-1.1",
25+
"spdx_license_expression": "Apache-1.1",
26+
"combination_reasons": [
27+
"not-combined"
28+
],
29+
"matches": [
30+
{
31+
"score": 96.07,
32+
"start_line": 7,
33+
"end_line": 70,
34+
"matched_length": 367,
35+
"match_coverage": 100.0,
36+
"matcher": "3-seq",
37+
"license_expression": "apache-1.1",
38+
"licensedb_identifier": "apache-1.1_63.RULE",
39+
"referenced_filenames": [],
40+
"is_license_text": true,
41+
"is_license_notice": false,
42+
"is_license_reference": false,
43+
"is_license_tag": false,
44+
"is_license_intro": false,
45+
"rule_length": 367,
46+
"rule_relevance": 100,
47+
"licenses": [
48+
{
49+
"key": "apache-1.1",
50+
"name": "Apache License 1.1",
51+
"short_name": "Apache 1.1",
52+
"category": "Permissive",
53+
"is_exception": false,
54+
"is_unknown": false,
55+
"owner": "Apache Software Foundation",
56+
"homepage_url": "http://www.apache.org/licenses/",
57+
"text_url": "http://apache.org/licenses/LICENSE-1.1",
58+
"reference_url": "https://scancode-licensedb.aboutcode.org/apache-1.1",
59+
"scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-1.1.LICENSE",
60+
"scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-1.1.yml",
61+
"spdx_license_key": "Apache-1.1",
62+
"spdx_url": "https://spdx.org/licenses/Apache-1.1"
63+
}
64+
]
65+
}
66+
]
9167
}
9268
],
69+
"license_clues": [],
9370
"license_expressions": [
9471
"apache-1.1"
9572
],
73+
"spdx_license_expressions": [
74+
"Apache-1.1"
75+
],
9676
"percentage_of_license_text": 92.44,
9777
"copyrights": [
9878
{
9979
"copyright": "Copyright (c) The Eclipse Foundation https://eclipse.org",
10080
"start_line": 2,
10181
"end_line": 3
10282
},
83+
{
84+
"copyright": "Copyright (c) The Apache Software Foundation",
85+
"start_line": 14,
86+
"end_line": 14
87+
},
10388
{
10489
"copyright": "Copyright (c) The Eclipse Foundation https://eclipse.org",
10590
"start_line": 41,
10691
"end_line": 42
92+
},
93+
{
94+
"copyright": "copyright (c) 1999, International Business Machines, Inc., http://www.ibm.com",
95+
"start_line": 67,
96+
"end_line": 68
10797
}
10898
],
10999
"holders": [
@@ -112,10 +102,20 @@
112102
"start_line": 2,
113103
"end_line": 2
114104
},
105+
{
106+
"holder": "The Apache Software Foundation",
107+
"start_line": 14,
108+
"end_line": 14
109+
},
115110
{
116111
"holder": "The Eclipse Foundation",
117112
"start_line": 41,
118113
"end_line": 41
114+
},
115+
{
116+
"holder": "International Business Machines, Inc.",
117+
"start_line": 67,
118+
"end_line": 68
119119
}
120120
],
121121
"authors": [
@@ -124,6 +124,11 @@
124124
"start_line": 5,
125125
"end_line": 5
126126
},
127+
{
128+
"author": "the Apache Software Foundation (http://www.apache.org/)",
129+
"start_line": 31,
130+
"end_line": 32
131+
},
127132
{
128133
"author": "John Doe",
129134
"start_line": 44,
@@ -135,6 +140,11 @@
135140
"email": "foo@eclipse.org",
136141
"start_line": 4,
137142
"end_line": 4
143+
},
144+
{
145+
"email": "apache@apache.org",
146+
"start_line": 39,
147+
"end_line": 39
138148
}
139149
],
140150
"urls": [],

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

Lines changed: 47 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,4 @@
11
{
2-
"headers": [
3-
{
4-
"tool_name": "scancode-toolkit",
5-
"options": {
6-
"input": "<path>",
7-
"--copyright": true,
8-
"--email": true,
9-
"--filter-clues": true,
10-
"--info": true,
11-
"--json": "<file>",
12-
"--license": true,
13-
"--url": true
14-
},
15-
"notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
16-
"output_format_version": "2.0.0",
17-
"message": null,
18-
"errors": [],
19-
"warnings": [],
20-
"extra_data": {
21-
"system_environment": {
22-
"operating_system": "linux",
23-
"cpu_architecture": "64",
24-
"platform": "Linux-5.4.0-109-generic-x86_64-with-Ubuntu-18.04-bionic",
25-
"platform_version": "#123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022",
26-
"python_version": "3.6.9 (default, Mar 15 2022, 13:55:28) \n[GCC 8.4.0]"
27-
},
28-
"spdx_license_list_version": "3.16",
29-
"files_count": 1
30-
}
31-
}
32-
],
332
"files": [
343
{
354
"path": "LICENSE2",
@@ -52,47 +21,58 @@
5221
"is_script": false,
5322
"licenses": [
5423
{
55-
"key": "pygres-2.2",
56-
"score": 100.0,
57-
"name": "PyGres License v2.2",
58-
"short_name": "PyGres License 2.2",
59-
"category": "Permissive",
60-
"is_exception": false,
61-
"is_unknown": false,
62-
"owner": "Unspecified",
63-
"homepage_url": null,
64-
"text_url": "http://shell.vex.net/viewvc.cgi/pygresql/trunk/module/pgmodule.c?view=markup&pathrev=431",
65-
"reference_url": "https://scancode-licensedb.aboutcode.org/pygres-2.2",
66-
"scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.LICENSE",
67-
"scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.yml",
68-
"spdx_license_key": "LicenseRef-scancode-pygres-2.2",
69-
"spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.LICENSE",
70-
"start_line": 7,
71-
"end_line": 22,
72-
"matched_rule": {
73-
"identifier": "pygres-2.2_2.RULE",
74-
"license_expression": "pygres-2.2",
75-
"licenses": [
76-
"pygres-2.2"
77-
],
78-
"referenced_filenames": [],
79-
"is_license_text": true,
80-
"is_license_notice": false,
81-
"is_license_reference": false,
82-
"is_license_tag": false,
83-
"is_license_intro": false,
84-
"has_unknown": false,
85-
"matcher": "2-aho",
86-
"rule_length": 145,
87-
"matched_length": 145,
88-
"match_coverage": 100.0,
89-
"rule_relevance": 100
90-
}
24+
"license_expression": "pygres-2.2",
25+
"spdx_license_expression": "LicenseRef-scancode-pygres-2.2",
26+
"combination_reasons": [
27+
"not-combined"
28+
],
29+
"matches": [
30+
{
31+
"score": 100.0,
32+
"start_line": 7,
33+
"end_line": 22,
34+
"matched_length": 145,
35+
"match_coverage": 100.0,
36+
"matcher": "2-aho",
37+
"license_expression": "pygres-2.2",
38+
"licensedb_identifier": "pygres-2.2_2.RULE",
39+
"referenced_filenames": [],
40+
"is_license_text": true,
41+
"is_license_notice": false,
42+
"is_license_reference": false,
43+
"is_license_tag": false,
44+
"is_license_intro": false,
45+
"rule_length": 145,
46+
"rule_relevance": 100,
47+
"licenses": [
48+
{
49+
"key": "pygres-2.2",
50+
"name": "PyGres License v2.2",
51+
"short_name": "PyGres License 2.2",
52+
"category": "Permissive",
53+
"is_exception": false,
54+
"is_unknown": false,
55+
"owner": "Unspecified",
56+
"homepage_url": null,
57+
"text_url": "http://shell.vex.net/viewvc.cgi/pygresql/trunk/module/pgmodule.c?view=markup&pathrev=431",
58+
"reference_url": "https://scancode-licensedb.aboutcode.org/pygres-2.2",
59+
"scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.LICENSE",
60+
"scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.yml",
61+
"spdx_license_key": "LicenseRef-scancode-pygres-2.2",
62+
"spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/pygres-2.2.LICENSE"
63+
}
64+
]
65+
}
66+
]
9167
}
9268
],
69+
"license_clues": [],
9370
"license_expressions": [
9471
"pygres-2.2"
9572
],
73+
"spdx_license_expressions": [
74+
"LicenseRef-scancode-pygres-2.2"
75+
],
9676
"percentage_of_license_text": 69.38,
9777
"copyrights": [
9878
{

0 commit comments

Comments
 (0)