Skip to content

Commit 4cf84c7

Browse files
Regenerate test expectations
* rename top level attirbute `licenses` -> `license_detections` * rename top level attribute `rule_references` to `license_rule_references` * include license_expression in identifier * use the correct spelling for occurrance * include matched_text in matches instead of reference data * file level attribute `for_licenses` changed to `for_license_detections` * fix bugs including license rule references correctly * make license references default to `--licenses` Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 890b297 commit 4cf84c7

File tree

182 files changed

+14916
-14437
lines changed

Some content is hidden

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

182 files changed

+14916
-14437
lines changed

docs/source/explanations/license-detection-reference.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ After::
528528
"text": "Apache License\nVersion 2.0, {Truncated text}"
529529
}
530530
],
531-
"rule_references": [
531+
"license_rule_references": [
532532
{
533533
"license_expression": "apache-2.0",
534534
"rule_identifier": "apache-2.0_65.RULE",

tests/cluecode/data/plugin_email_url/emails-threshold.expected.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"license_references": [],
3-
"rule_references": [],
42
"files": [
53
{
64
"path": "3w-xxxx.c",

tests/cluecode/data/plugin_email_url/emails.expected.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"license_references": [],
3-
"rule_references": [],
42
"files": [
53
{
64
"path": "3w-xxxx.c",

tests/cluecode/data/plugin_email_url/urls-threshold.expected.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"license_references": [],
3-
"rule_references": [],
42
"files": [
53
{
64
"path": "3w-xxxx.c",

tests/cluecode/data/plugin_email_url/urls.expected.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"license_references": [],
3-
"rule_references": [],
42
"files": [
53
{
64
"path": "3w-xxxx.c",

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"licenses": [
2+
"license_detections": [
33
{
4-
"identifier": "81b019ea-ed6c-17e3-1cfc-fad8557f8cac",
4+
"identifier": "apache_1_1#81b019ea-ed6c-17e3-1cfc-fad8557f8cac",
55
"license_expression": "apache-1.1",
6-
"occurance_count": 1,
6+
"occurrence_count": 1,
77
"detection_log": [
88
"not-combined"
99
],
@@ -45,7 +45,7 @@
4545
"text": "The Apache Software License, Version 1.1\n\nCopyright (c) 2000 The Apache Software Foundation. All rights\nreserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in\nthe documentation and/or other materials provided with the\ndistribution.\n\n3. The end-user documentation included with the redistribution,\nif any, must include the following acknowledgment:\n\"This product includes software developed by the\nApache Software Foundation (http://www.apache.org/).\"\nAlternately, this acknowledgment may appear in the software itself,\nif and wherever such third-party acknowledgments normally appear.\n\n4. The names \"Apache\" and \"Apache Software Foundation\" must\nnot be used to endorse or promote products derived from this\nsoftware without prior written permission. For written\npermission, please contact apache@apache.org.\n\n5. Products derived from this software may not be called \"Apache\",\nnor may \"Apache\" appear in their name, without prior written\npermission of the Apache Software Foundation.\n\nTHIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR\nITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\nUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\nOF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGE."
4646
}
4747
],
48-
"rule_references": [
48+
"license_rule_references": [
4949
{
5050
"license_expression": "apache-1.1",
5151
"rule_identifier": "apache-1.1_63.RULE",
@@ -104,8 +104,8 @@
104104
],
105105
"license_clues": [],
106106
"percentage_of_license_text": 92.44,
107-
"for_licenses": [
108-
"81b019ea-ed6c-17e3-1cfc-fad8557f8cac"
107+
"for_license_detections": [
108+
"apache_1_1#81b019ea-ed6c-17e3-1cfc-fad8557f8cac"
109109
],
110110
"copyrights": [
111111
{

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"licenses": [
2+
"license_detections": [
33
{
4-
"identifier": "7b7e2330-4841-998b-3287-06b5bc6e5a90",
4+
"identifier": "pygres_2_2#7b7e2330-4841-998b-3287-06b5bc6e5a90",
55
"license_expression": "pygres-2.2",
6-
"occurance_count": 1,
6+
"occurrence_count": 1,
77
"detection_log": [
88
"not-combined"
99
],
@@ -37,7 +37,7 @@
3737
"text": "PyGres, version 2.2 A Python interface for PostgreSQL database. Written by\nD'Arcy J.M. Cain, (darcy@druid.net). Based heavily on code written by\nPascal Andre, andre@chimay.via.ecp.fr. Copyright (c) 1995, Pascal Andre\n(andre@via.ecp.fr).\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose, without fee, and without a written\nagreement is hereby granted, provided that the above copyright notice and\nthis paragraph and the following two paragraphs appear in all copies or in\nany new file that contains a substantial portion of this file.\n\nIN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,\nSPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,\nARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE\nAUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nTHE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN \"AS IS\" BASIS, AND THE\nAUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,\nENHANCEMENTS, OR MODIFICATIONS.\n\nFurther modifications copyright 1997, 1998, 1999 by D'Arcy J.M. Cain\n(darcy@druid.net) subject to the same terms and conditions as above."
3838
}
3939
],
40-
"rule_references": [
40+
"license_rule_references": [
4141
{
4242
"license_expression": "pygres-2.2",
4343
"rule_identifier": "pygres-2.2_2.RULE",
@@ -96,8 +96,8 @@
9696
],
9797
"license_clues": [],
9898
"percentage_of_license_text": 69.38,
99-
"for_licenses": [
100-
"7b7e2330-4841-998b-3287-06b5bc6e5a90"
99+
"for_license_detections": [
100+
"pygres_2_2#7b7e2330-4841-998b-3287-06b5bc6e5a90"
101101
],
102102
"copyrights": [
103103
{

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"licenses": [
2+
"license_detections": [
33
{
4-
"identifier": "043db187-9376-d7a9-e89b-d027667acb34",
4+
"identifier": "pcre#043db187-9376-d7a9-e89b-d027667acb34",
55
"license_expression": "pcre",
6-
"occurance_count": 1,
6+
"occurrence_count": 1,
77
"detection_log": [
88
"not-combined"
99
],
@@ -38,7 +38,7 @@
3838
"text": "PCRE LICENCE\n------------\n\nPCRE is a library of functions to support regular expressions whose\nsyntax and semantics are as close as possible to those of the Perl 5\nlanguage.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\nUniversity of Cambridge Computing Service, Cambridge, England.\nPhone: +44 1223 334714.\nCopyright (c) 1997-2001 University of Cambridge\n\nPermission is granted to anyone to use this software for any purpose on\nany computer system, and to redistribute it freely, subject to the\nfollowing restrictions:\n\n1. This software is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\nexplicit claim or by omission. In practice, this means that if you use\nPCRE in software which you distribute to others, commercially or\notherwise, you must put a sentence like this\n\"Regular expression support is provided by the PCRE library package,\nwhich is open source software, written by Philip Hazel, and copyright by\nthe University of Cambridge, England\"\n\nsomewhere reasonably visible in your documentation and in any relevant\nfiles or online help data or similar.\n\nA reference to the ftp site for the source, that is, to\nftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/\nshould also be given in the documentation.\n\n3. Altered versions must be plainly marked as such, and must not be\nmisrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\nGeneral Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL),\nthen the terms of that licence shall supersede any condition above with\nwhich it is incompatible.\n\nThe documentation for PCRE, supplied in the \"doc\" directory, is\ndistributed under the same terms as the software itself.\n\nEnd PCRE LICENCE"
3939
}
4040
],
41-
"rule_references": [
41+
"license_rule_references": [
4242
{
4343
"license_expression": "pcre",
4444
"rule_identifier": "pcre.LICENSE",
@@ -97,8 +97,8 @@
9797
],
9898
"license_clues": [],
9999
"percentage_of_license_text": 100.0,
100-
"for_licenses": [
101-
"043db187-9376-d7a9-e89b-d027667acb34"
100+
"for_license_detections": [
101+
"pcre#043db187-9376-d7a9-e89b-d027667acb34"
102102
],
103103
"copyrights": [
104104
{

tests/cluecode/data/plugin_ignore_copyrights/authors.expected.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"license_references": [],
3-
"rule_references": [],
42
"files": [
53
{
64
"path": "basic.tgz",

tests/cluecode/data/plugin_ignore_copyrights/holders.expected.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"license_references": [],
3-
"rule_references": [],
42
"files": [
53
{
64
"path": "basic.tgz",

0 commit comments

Comments
 (0)