From c206f9196f06dd6b58520c43f5b6e4df4f4daa02 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Mon, 8 Apr 2024 10:13:23 +0200 Subject: [PATCH 01/30] Detect odd name in copyright #3655 Reported-by: Anton Augsburg @vw-anton Reference: https://github.com/nexB/scancode-toolkit/issues/3655 Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 4 ++++ tests/cluecode/data/copyrights/moment-license.txt | 2 ++ tests/cluecode/data/copyrights/moment-license.txt.yml | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 tests/cluecode/data/copyrights/moment-license.txt create mode 100644 tests/cluecode/data/copyrights/moment-license.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index f5f1ed508b4..7e0f63910ca 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2067,6 +2067,10 @@ def build_detection_from_node( # dot in: fooo at bar dot com (r'^dot$', 'DOT'), + + # moment/moment is an odd name + (r'moment/moment$', 'NAME'), + ############################################################################ # catch all other as Nouns diff --git a/tests/cluecode/data/copyrights/moment-license.txt b/tests/cluecode/data/copyrights/moment-license.txt new file mode 100644 index 00000000000..c81a7a3a25d --- /dev/null +++ b/tests/cluecode/data/copyrights/moment-license.txt @@ -0,0 +1,2 @@ +Copyright (c) moment/moment + diff --git a/tests/cluecode/data/copyrights/moment-license.txt.yml b/tests/cluecode/data/copyrights/moment-license.txt.yml new file mode 100644 index 00000000000..9b6202ba826 --- /dev/null +++ b/tests/cluecode/data/copyrights/moment-license.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders +copyrights: + - Copyright (c) moment/moment +holders: + - moment/moment From 54b23093b434ee81171d34b0b3598b1006365969 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 10 Apr 2024 20:09:58 +0200 Subject: [PATCH 02/30] Do not detect trailing Distributed in copyright #3735 Reported-by: Dimitris Iliou @dimitris-iliou Reference: https://github.com/nexB/scancode-toolkit/issues/3735 Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 1 + tests/cluecode/data/copyrights/distributed.hpp | 4 ++++ tests/cluecode/data/copyrights/distributed.hpp.yml | 7 +++++++ 3 files changed, 12 insertions(+) create mode 100644 tests/cluecode/data/copyrights/distributed.hpp create mode 100644 tests/cluecode/data/copyrights/distributed.hpp.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 7e0f63910ca..c4308eb4c3c 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -1251,6 +1251,7 @@ def build_detection_from_node( (r'^Extended', 'NN'), (r'^Every$', 'NN'), (r'^Digitized', 'NN'), + (r'^[Ds]istributed?.?$', 'NN'), (r'^END$', 'NN'), (r'^Entity$', 'NN'), (r'^Example', 'NN'), diff --git a/tests/cluecode/data/copyrights/distributed.hpp b/tests/cluecode/data/copyrights/distributed.hpp new file mode 100644 index 00000000000..103eb189eeb --- /dev/null +++ b/tests/cluecode/data/copyrights/distributed.hpp @@ -0,0 +1,4 @@ +i// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. + + diff --git a/tests/cluecode/data/copyrights/distributed.hpp.yml b/tests/cluecode/data/copyrights/distributed.hpp.yml new file mode 100644 index 00000000000..ac91c32d17f --- /dev/null +++ b/tests/cluecode/data/copyrights/distributed.hpp.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders +copyrights: + - Copyright 2008-2010 Gordon Woodhull +holders: + - Gordon Woodhull From 5215ef4b8ba4e9d5830340a46a748c551e8e51e3 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 10 Apr 2024 20:29:02 +0200 Subject: [PATCH 03/30] Improve misc. copyright detections Spotted in some common python libraries such as numpy and scipy Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 24 ++++++- .../data/copyrights/copyrights-to-fix.txt | 68 +++++++++++++++++++ .../data/copyrights/copyrights-to-fix.txt.yml | 18 +++++ 3 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 tests/cluecode/data/copyrights/copyrights-to-fix.txt create mode 100644 tests/cluecode/data/copyrights/copyrights-to-fix.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index c4308eb4c3c..13361c77923 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -1140,6 +1140,16 @@ def build_detection_from_node( (r'^[MmNn]odules?[,\.]?$', 'JUNK'), (r'^[Rr]eturned$', 'JUNK'), + # misc junk + (r'^False.?$', 'JUNK'), + (r'^True.?$', 'JUNK'), + + (r'^imports?$', 'JUNK'), + (r'^[Ww]arnings?$', 'JUNK'), + (r'^[Ww]hether$', 'JUNK'), + (r'^[Bb]oth$', 'JUNK'), + (r'^[Cc]aller$', 'JUNK'), + # tags (r'^E-?[Mm]ail:?$', 'JUNK'), (r'^URL:?$', 'JUNK'), @@ -1252,6 +1262,12 @@ def build_detection_from_node( (r'^Every$', 'NN'), (r'^Digitized', 'NN'), (r'^[Ds]istributed?.?$', 'NN'), + + (r'^Multiply$', 'NN'), + (r'^Convert$', 'NN'), + (r'^Compute$', 'NN'), + (r'^Case$', 'NN'), + (r'^END$', 'NN'), (r'^Entity$', 'NN'), (r'^Example', 'NN'), @@ -3262,7 +3278,7 @@ def refine_names(s, prefixes): r'^copyright \(c\)$', r'^\(c\) by$', - r"\(c\) [A-Z][a-z] \(c\)", + r"\(c\) [a-z][a-z] \(c\)", r"^copyright holder or simply", r"^copyright notice\.", r"^copyright of uc berkeley's berkeley software distribution", @@ -3326,6 +3342,8 @@ def refine_names(s, prefixes): r'^u\.s\. copyright act', r'^\(c\) Object c$', r'^copyright headers?', + r'Copyright \(c\) 2021 Dot', + r'^\(c\) \(c\) B$' ] # a collection of junk junk matcher callables @@ -3551,7 +3569,7 @@ def remove_dupe_copyright_words(c): def remove_some_extra_words_and_punct(c): """ - Remove misc junk includein some punctuations + Remove misc junk including some punctuations """ c = c.replace('

', ' ') c = c.replace(' +# License: BSD 3 clause (C) 2011 +import warnings + + +# Copyright (c) 2011, 2012 +# Authors: Pietro Berkes, + + + +# Author: Jake Vanderplas -- +# License: BSD 3 clause (C) 2011 + +import numpy as np + + + +# extra quote + +copyright = u"2010-2020, Benjamin Peterson" + + +(c) KOKOKOKOKKuKyKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKxKyK KyKxKzKzKzKzKzKzKzKzKzKzKzKzKyKxKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzKzK K K KzK K + + + +# junk in Pyparsing +Don't get excited! +I said "Don't get excited!" +Copyright © 2021 +Dot ⟶ ˙ + diff --git a/tests/cluecode/data/copyrights/copyrights-to-fix.txt.yml b/tests/cluecode/data/copyrights/copyrights-to-fix.txt.yml new file mode 100644 index 00000000000..70f2a994973 --- /dev/null +++ b/tests/cluecode/data/copyrights/copyrights-to-fix.txt.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders +copyrights: + - copyright 2017-2018, NumPy Developers + - Copyright (c) 2017 + - Copyright 2001 + - Copyright 2003 + - Copyright 2008 + - (c) 2003, C. Bond + - (c) 2011 + - Copyright (c) 2011, 2012 + - (c) 2011 + - copyright 2010-2020, Benjamin Peterson +holders: + - NumPy Developers + - C. Bond + - Benjamin Peterson From d1cf644228d3c44547cd5a51d64be11c3869a3ef Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 12 Apr 2024 09:57:15 +0200 Subject: [PATCH 04/30] Add new script to generate copyright tests Use an input file where each line is either: - a URL to fetch - a text to test Then generate a test data files pair accordingly Signed-off-by: Philippe Ombredanne --- etc/scripts/gen_copyright_tests.py | 162 +++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100755 etc/scripts/gen_copyright_tests.py diff --git a/etc/scripts/gen_copyright_tests.py b/etc/scripts/gen_copyright_tests.py new file mode 100755 index 00000000000..2aef0179f38 --- /dev/null +++ b/etc/scripts/gen_copyright_tests.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright (c) nexB Inc. and others. All rights reserved. +# ScanCode is a trademark of nexB Inc. +# SPDX-License-Identifier: Apache-2.0 +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. +# See https://github.com/nexB/skeleton for support or download. +# See https://aboutcode.org for more information about nexB OSS projects. +# + +import time + +from datetime import datetime + +import click +import requests + + +def timestamp(): + return datetime.utcnow().isoformat().split("T")[0] + + +EMPTY_COPY_TEST = """what: + - copyrights + - holders +copyrights: +holders: +""" + + +@click.command() +@click.option( + "-u", + "--urls", + "urls_file", + type=click.Path(exists=True, readable=True, path_type=str, dir_okay=False), + metavar="URLS-FILE", + multiple=False, + required=True, + help="Path to URLs file, one per line.", +) +@click.help_option("-h", "--help") +def create_copyright_tests( + urls_file, +): + """ + Download the URLs listed in the URLS-FILE and create a copyight test for each in the current + directory. + + If a line number is provided as a URL fragment #L2, uses only 5 lines before and after this + line. + + If the URL is a plain GitHub URL, convert the URL to a raw URL. + If the URL does not start with http it is treated as a plain copyright text to test + """ + + with open(urls_file) as urls: + for i, url in enumerate(urls): + url = url.strip() + if not url: + continue + + name = "" + if url.startswith("http"): + print(f"Fetching URL: {url}") + if url.startswith("https://github.com"): + url = url.replace("https://github.com", "https://raw.githubusercontent.com") + url = url.replace("/blob/", "/") + + if "github" in url: + segs = url.split("/") + org = segs[3] + repo = segs[4] + name = f"copyright-test-{timestamp()}-{i}-{org}-{repo}.copyright" + else: + print(f"Processing test: {url}") + name = f"copyright-test-{timestamp()}-{i}.copyright" + + + start_line = 0 + end_line = 0 + if "#L" in url: + _, _, line = url.rpartition("#L") + line = int(line) + if line > 5: + start_line = line - 5 + end_line = line + 5 + + if url.startswith("http"): + _header, content = get_remote_file_content(url, as_text=True) + else: + content = url + + if end_line != 0: + content = "".join(content.strip().splitlines()[start_line:end_line]) + + with open(name, "w") as out: + out.write(content) + + yml = EMPTY_COPY_TEST + if url.startswith("http"): + yml = f"{yml}\nnotes: from {url}\n" + + with open(f"{name}.yml", "w") as out: + out.write(yml) + + if url.startswith("http"): + time.sleep(1) + + +class RemoteNotFetchedException(Exception): + pass + + +def get_remote_file_content( + url, + as_text=True, + headers_only=False, + headers=None, + _delay=0, +): + """ + Fetch and return a tuple of (headers, content) at `url`. Return content as a + text string if `as_text` is True. Otherwise return the content as bytes. + + If `header_only` is True, return only (headers, None). Headers is a mapping + of HTTP headers. + Retries multiple times to fetch if there is a HTTP 429 throttling response + and this with an increasing delay. + """ + time.sleep(_delay) + headers = headers or {} + # using a GET with stream=True ensure we get the the final header from + # several redirects and that we can ignore content there. A HEAD request may + # not get us this last header + print(f" DOWNLOADING: {url}") + with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: + status = response.status_code + if status != requests.codes.ok: # NOQA + if status == 429 and _delay < 20: + # too many requests: start some exponential delay + increased_delay = (_delay * 2) or 1 + + return get_remote_file_content( + url, + as_text=as_text, + headers_only=headers_only, + _delay=increased_delay, + ) + + else: + raise RemoteNotFetchedException(f"Failed HTTP request from {url} with {status}") + + if headers_only: + return response.headers, None + + return response.headers, response.text if as_text else response.content + + +if __name__ == "__main__": + create_copyright_tests() From 52945217194f3468da5025e58daf0d33b2e1909d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 12 Apr 2024 10:07:50 +0200 Subject: [PATCH 05/30] Improve copyright detection - Start detecting "is held by" - Do not include some trailing junk Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 37 +++++++++++++------ .../data/copyright_fossology/testdata118_raw | 2 +- .../data/copyright_fossology/testdata119_raw | 2 +- .../data/copyright_fossology/testdata128_raw | 2 +- .../data/copyright_fossology/testdata23_raw | 4 +- .../copyrights/with_trailing_words.js.yml | 9 ++--- .../data/generated/copyright_49.txt.yml | 2 - .../about_credits.html.yml | 6 +-- .../NOTICE.yml | 6 +-- .../ics/qemu-distrib-libpng-1.2.19/png.h.yml | 10 ++--- 10 files changed, 43 insertions(+), 37 deletions(-) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 13361c77923..6deabad496d 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -279,18 +279,22 @@ def detect(self, 'YR-RANGE', 'YR-AND', 'YR', 'YR-PLUS', 'BARE-YR', 'EMAIL', 'URL', 'HOLDER', 'AUTHOR', + 'IS', 'HELD', + ]) non_holder_labels_mini = frozenset([ 'COPY', 'YR-RANGE', 'YR-AND', 'YR', 'YR-PLUS', 'BARE-YR', 'HOLDER', 'AUTHOR', + 'IS', 'HELD', ]) non_authors_labels = frozenset([ 'COPY', 'YR-RANGE', 'YR-AND', 'YR', 'YR-PLUS', 'BARE-YR', 'HOLDER', 'AUTHOR', + 'IS', 'HELD', ]) # then walk the parse parse_tree, collecting copyrights, years and authors @@ -703,6 +707,11 @@ def build_detection_from_node( (r'^[Rr]éservés[\.,]*$', 'RESERVED'), (r'^[Rr]eserves[\.,]*$', 'RESERVED'), + # used to detect "copyright is held by..." + (r'^is$', 'IS'), + (r'^are$', 'IS'), + (r'^held$', 'HELD'), + # TODO: in Dutch Alle rechten voorbehouden. # TODO: in Spanish Reservados todos los derechos @@ -736,6 +745,9 @@ def build_detection_from_node( # JUNK proper ############################################################################ + # all lower case with dashes "enforce-trailing-newline" at least 3 times + (r'^((\w+-){3,}\w+)$', 'JUNK'), + # path with trailing year-like are NOT a year as in # Landroid/icu/impl/IDNA2003 : treat as JUNK (r'^[^\\/]+[\\/][^\\/]+[\\/].*$', 'JUNK'), @@ -825,7 +837,6 @@ def build_detection_from_node( (r'^Idata$', 'JUNK'), (r'^[Cc]ontributed?$', 'JUNK'), (r'^[Ff]unctions?$', 'JUNK'), - (r'^[Nn]otices?$', 'JUNK'), (r'^[Mm]ust$', 'JUNK'), (r'^ISUPPER?$', 'JUNK'), (r'^ISLOWER$', 'JUNK'), @@ -891,8 +902,6 @@ def build_detection_from_node( (r'^providing$', 'JUNK'), (r'^Execute$', 'JUNK'), - (r'^NOTICE[.,]*$', 'JUNK'), - (r'^[Nn]otice[.,]*$', 'JUNK'), (r'^passes$', 'JUNK'), (r'^Should$', 'JUNK'), (r'^[Ll]icensing\@?$', 'JUNK'), @@ -964,7 +973,6 @@ def build_detection_from_node( (r'^Much$', 'JUNK'), (r'^remains?,?$', 'JUNK'), (r'^earlier$', 'JUNK'), - (r'^is$', 'JUNK'), (r'^[lL]aws?$', 'JUNK'), (r'^Insert$', 'JUNK'), (r'^url$', 'JUNK'), @@ -986,7 +994,6 @@ def build_detection_from_node( (r'^interfaces?,?$', 'JUNK'), (r'^than$', 'JUNK'), (r'^whom$', 'JUNK'), - (r'^are$', 'JUNK'), (r'^However,?$', 'JUNK'), (r'^[Cc]ollectively$', 'JUNK'), (r'^following$', 'JUNK'), @@ -1365,7 +1372,8 @@ def build_detection_from_node( (r'^Neither$', 'NN'), (r'^Norwegian$', 'NN'), (r'^Notes?$', 'NN'), - (r'^NOTICE', 'NN'), + (r'^NOTICE[\.\,]?$', 'NN'), + (r'^[Nn]otices?[\.,]?$', 'NN'), (r'^NOT$', 'NN'), (r'^NULL$', 'NN'), (r'^Objects?$', 'NN'), @@ -2764,8 +2772,8 @@ def build_detection_from_node( # portions copyright COPYRIGHT: { } #2610 - #copyright notice (3dfx Interactive, Inc. 1999), (notice is JUNK) - COPYRIGHT: { } #2620 + #copyright notice (3dfx Interactive, Inc. 1999), + COPYRIGHT: { } #2620 # Copyright (C) <2013>, GENIVI Alliance, Inc. COPYRIGHT: { } #2625 @@ -2977,7 +2985,7 @@ def build_detection_from_node( COPYRIGHT: { } #83000 #holder is Tim Hudson (tjh@mincom.oz.au). - COPYRIGHT: { } #83001 + COPYRIGHT: { } #83001 # Copyright lowRISC contributors. COPYRIGHT: { } #83002 @@ -2991,6 +2999,11 @@ def build_detection_from_node( # Copyright OProfile authors COPYRIGHT: { ?+ } #83004 +####################################### +# Copyright is held by .... +####################################### + # Copyright is held by .... + COPYRIGHT: { + } #10989898 ####################################### @@ -2998,7 +3011,7 @@ def build_detection_from_node( ####################################### # SPDX-FileContributor special case - AUTHOR: { ? } #264000 + AUTHOR: { ? } #264000 # developed by Project Mayo. AUTHOR: {+ } #2645-1 @@ -3635,11 +3648,11 @@ def strip_trailing_period(s): is_single_word = len(s.split()) == 1 - # U.S.A., e.V., M.I.T. and similar + # U.S.A., e.V., M.I.T. and similar if s[-2].isupper() and not is_single_word: return s - # S.A., e.v., b.v. and other + # S.A., e.v., b.v. and other if s[-3] == '.': return s diff --git a/tests/cluecode/data/copyright_fossology/testdata118_raw b/tests/cluecode/data/copyright_fossology/testdata118_raw index e82e00b7b89..9817769665d 100644 --- a/tests/cluecode/data/copyright_fossology/testdata118_raw +++ b/tests/cluecode/data/copyright_fossology/testdata118_raw @@ -334,7 +334,7 @@ For files in the libpng directory: Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the + Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: diff --git a/tests/cluecode/data/copyright_fossology/testdata119_raw b/tests/cluecode/data/copyright_fossology/testdata119_raw index a92d6a06d55..9e082ade3f6 100644 --- a/tests/cluecode/data/copyright_fossology/testdata119_raw +++ b/tests/cluecode/data/copyright_fossology/testdata119_raw @@ -334,7 +334,7 @@ For files in the libpng directory: Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the + Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: diff --git a/tests/cluecode/data/copyright_fossology/testdata128_raw b/tests/cluecode/data/copyright_fossology/testdata128_raw index a97e9260f22..be3b553108c 100644 --- a/tests/cluecode/data/copyright_fossology/testdata128_raw +++ b/tests/cluecode/data/copyright_fossology/testdata128_raw @@ -334,7 +334,7 @@ For files in the libpng directory: Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the + Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: diff --git a/tests/cluecode/data/copyright_fossology/testdata23_raw b/tests/cluecode/data/copyright_fossology/testdata23_raw index d7985069a46..024deb03408 100644 --- a/tests/cluecode/data/copyright_fossology/testdata23_raw +++ b/tests/cluecode/data/copyright_fossology/testdata23_raw @@ -229,8 +229,8 @@ - diff --git a/tests/cluecode/data/copyrights/with_trailing_words.js.yml b/tests/cluecode/data/copyrights/with_trailing_words.js.yml index ee779779521..f8516216aa4 100644 --- a/tests/cluecode/data/copyrights/with_trailing_words.js.yml +++ b/tests/cluecode/data/copyrights/with_trailing_words.js.yml @@ -7,7 +7,6 @@ copyrights: - Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Distributed - (c) Varun Malhotra 2013 Source Code https://github.com/softvar/json2html - Copyright 2015, Mycompany - Copyright 2015, Mycompany @@ -16,18 +15,16 @@ holders: - The Dojo Foundation - Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - - Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Distributed + - Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Varun Malhotra Source Code - Mycompany - Mycompany - Mycompany holders_summary: + - value: Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + count: 3 - value: Mycompany count: 3 - - value: Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - count: 2 - - value: Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Distributed - count: 1 - value: The Dojo Foundation count: 1 - value: Varun Malhotra Source Code diff --git a/tests/cluecode/data/generated/copyright_49.txt.yml b/tests/cluecode/data/generated/copyright_49.txt.yml index c4a5b74c50a..373ff327144 100644 --- a/tests/cluecode/data/generated/copyright_49.txt.yml +++ b/tests/cluecode/data/generated/copyright_49.txt.yml @@ -4,7 +4,5 @@ what: - authors copyrights: - Copyright (c) 2006, Industrial Light & Magic - - copyright held by others as indicated holders: - Industrial Light & Magic - - others as indicated diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml b/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml index d483de082c9..87aee8afbd5 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml @@ -60,7 +60,7 @@ copyrights: - Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson - Copyright (c) 2000-2002 Glenn Randers-Pehrson - Copyright (c) 1998, 1999 Glenn Randers-Pehrson - - Copyright (c) 1996, 1997 Andreas Dilger Distributed + - Copyright (c) 1996, 1997 Andreas Dilger - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - Copyright (c) 2001-2006 Cisco Systems, Inc. - Copyright (c) 2010, Google Inc. @@ -165,7 +165,7 @@ holders: - Glenn Randers-Pehrson - Glenn Randers-Pehrson - Glenn Randers-Pehrson - - Andreas Dilger Distributed + - Andreas Dilger - Guy Eric Schalnat, Group 42, Inc. - Cisco Systems, Inc. - Google Inc. @@ -247,7 +247,7 @@ holders_summary: count: 1 - value: Analog Devices Inc. count: 1 - - value: Andreas Dilger Distributed + - value: Andreas Dilger count: 1 - value: Andrew Tridgell count: 1 diff --git a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml index f703a7bab97..bd977225b17 100644 --- a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml +++ b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml @@ -6,13 +6,13 @@ copyrights: - copyright unitedHeroes.net - Copyright (c) 2009, unitedHeroes.net - Copyright Paul Johnston 2000 - 2002. Other contributors Greg Holt, Andrew Kepert, Ydnar, - Lostinet Distributed + Lostinet holders: - unitedHeroes.net - unitedHeroes.net - - Paul Johnston - Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet Distributed + - Paul Johnston - Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet holders_summary: - value: unitedHeroes.net count: 2 - - value: Paul Johnston - Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet Distributed + - value: Paul Johnston - Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet count: 1 diff --git a/tests/cluecode/data/ics/qemu-distrib-libpng-1.2.19/png.h.yml b/tests/cluecode/data/ics/qemu-distrib-libpng-1.2.19/png.h.yml index 4826df4bf33..642a9e742ae 100644 --- a/tests/cluecode/data/ics/qemu-distrib-libpng-1.2.19/png.h.yml +++ b/tests/cluecode/data/ics/qemu-distrib-libpng-1.2.19/png.h.yml @@ -9,7 +9,7 @@ copyrights: - Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson - Copyright (c) 2000-2002 Glenn Randers-Pehrson - Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson - - Copyright (c) 1996, 1997 Andreas Dilger Distributed + - Copyright (c) 1996, 1997 Andreas Dilger - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. holders: - Glenn Randers-Pehrson @@ -18,14 +18,12 @@ holders: - Glenn Randers-Pehrson - Glenn Randers-Pehrson - Glenn Randers-Pehrson - - Andreas Dilger Distributed + - Andreas Dilger - Guy Eric Schalnat, Group 42, Inc. holders_summary: - value: Glenn Randers-Pehrson count: 4 + - value: Andreas Dilger + count: 2 - value: Guy Eric Schalnat, Group 42, Inc. count: 2 - - value: Andreas Dilger - count: 1 - - value: Andreas Dilger Distributed - count: 1 From ab6699fb57508605963c1c87637eacd68dd65278 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 7 May 2024 00:07:43 +0200 Subject: [PATCH 06/30] Detect NN/EMAIL copyright combo #3764 Reference: https://github.com/nexB/scancode-toolkit/issues/3764 Reported-by: Anton Augsburg @vw-anton Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 4 +++- .../data/copyrights/misco2/copyright-nn.txt | 6 ++++++ .../data/copyrights/misco2/copyright-nn.txt.yml | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tests/cluecode/data/copyrights/misco2/copyright-nn.txt create mode 100644 tests/cluecode/data/copyrights/misco2/copyright-nn.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 6deabad496d..116be2e4a31 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2718,7 +2718,9 @@ def build_detection_from_node( # Copyright (c) 2019-2021, Open source contributors. # Copyright 2007 ZXing authors # Copyright (c) 2002 the Initial Developer - COPYRIGHT: {+ + ? ?} #22793 + # Copyright (c) brandonocasey + # Copyright (c) 2024 bgme . + COPYRIGHT: {+ ? + ? ? ?} #22793.3 # Licensed material of Foobar Company, All Rights Reserved, (C) 2005 COPYRIGHT: { } #22794 diff --git a/tests/cluecode/data/copyrights/misco2/copyright-nn.txt b/tests/cluecode/data/copyrights/misco2/copyright-nn.txt new file mode 100644 index 00000000000..08ed7c3c6e3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/copyright-nn.txt @@ -0,0 +1,6 @@ +Copyright (c) brandonocasey + + + + +Copyright (c) 2024 bgme . diff --git a/tests/cluecode/data/copyrights/misco2/copyright-nn.txt.yml b/tests/cluecode/data/copyrights/misco2/copyright-nn.txt.yml new file mode 100644 index 00000000000..793a553bd7b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/copyright-nn.txt.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) brandonocasey + - Copyright (c) 2024 bgme +holders: + - brandonocasey + - bgme +holders_summary: + - value: bgme + count: 1 + - value: brandonocasey + count: 1 From ca8efbde2f7053aeb10cf779495c06e2d18a8ea2 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 10:27:24 +0200 Subject: [PATCH 07/30] Detect NN/EMAIL copyright combo #3764 Make detection of copyright with a single lowercase name more specific Reference: https://github.com/nexB/scancode-toolkit/issues/3764 Reported-by: Anton Augsburg @vw-anton Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 116be2e4a31..8b89f780982 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -717,7 +717,7 @@ def build_detection_from_node( ############################################################################ # JUNK are things to ignore - # Exceptions to JUNK + # These are exceptions to JUNK ############################################################################ # trailing parens: notice(s) and exceptions @@ -1168,6 +1168,10 @@ def build_detection_from_node( # :co,e):f (r'^[\:,\)]+[a-z]+[\:,]+[a-z]+[\:,\)]+[a-z\:,\)]*$', 'JUNK'), + # NN often used in conjunction with copyright + (r'^[Ss]tatements?.?$', 'JUNK'), + (r'^issues?.?$', 'JUNK'), + ############################################################################ # Nouns and proper Nouns ############################################################################ @@ -2718,9 +2722,11 @@ def build_detection_from_node( # Copyright (c) 2019-2021, Open source contributors. # Copyright 2007 ZXing authors # Copyright (c) 2002 the Initial Developer - # Copyright (c) brandonocasey # Copyright (c) 2024 bgme . - COPYRIGHT: {+ ? + ? ? ?} #22793.3 + COPYRIGHT: {+ + ? ? ?} #22793.3 + + # Copyright (c) brandonocasey + COPYRIGHT: {? ?} #22793.4 # Licensed material of Foobar Company, All Rights Reserved, (C) 2005 COPYRIGHT: { } #22794 From 235470116edeaec3ee77a168382369f26a9b0c3e Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 10:28:07 +0200 Subject: [PATCH 08/30] Align license with improved copyrights Signed-off-by: Philippe Ombredanne --- src/licensedcode/data/licenses/afpl-8.0.LICENSE | 2 ++ src/licensedcode/data/licenses/libpng.LICENSE | 4 ++-- src/licensedcode/data/rules/afpl-8.0_1.RULE | 4 ++++ src/licensedcode/data/rules/gpl-2.0_and_gpl-2.0-plus.RULE | 4 ++++ src/licensedcode/data/rules/libpng.SPDX.RULE | 4 ++-- src/licensedcode/data/rules/libpng_4.RULE | 4 ++-- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/licensedcode/data/licenses/afpl-8.0.LICENSE b/src/licensedcode/data/licenses/afpl-8.0.LICENSE index f65959cf24b..11eeade8f0a 100644 --- a/src/licensedcode/data/licenses/afpl-8.0.LICENSE +++ b/src/licensedcode/data/licenses/afpl-8.0.LICENSE @@ -12,7 +12,9 @@ text_urls: ignorable_copyrights: - Copyright (c) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises, Menlo Park, California, U.S.A. + - copyright is held by Aladdin Enterprises ignorable_holders: + - Aladdin Enterprises - Aladdin Enterprises, Menlo Park, California, U.S.A. --- diff --git a/src/licensedcode/data/licenses/libpng.LICENSE b/src/licensedcode/data/licenses/libpng.LICENSE index cb01896fa09..62088058a85 100644 --- a/src/licensedcode/data/licenses/libpng.LICENSE +++ b/src/licensedcode/data/licenses/libpng.LICENSE @@ -12,12 +12,12 @@ other_urls: - http://www.libpng.org/pub/png/src/libpng-LICENSE.txt ignorable_copyrights: - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - - Copyright (c) 1996, 1997 Andreas Dilger Distributed + - Copyright (c) 1996, 1997 Andreas Dilger - Copyright (c) 1998, 1999 Glenn Randers-Pehrson - Copyright (c) 2000-2002 Glenn Randers-Pehrson - Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson ignorable_holders: - - Andreas Dilger Distributed + - Andreas Dilger - Glenn Randers-Pehrson - Guy Eric Schalnat, Group 42, Inc. --- diff --git a/src/licensedcode/data/rules/afpl-8.0_1.RULE b/src/licensedcode/data/rules/afpl-8.0_1.RULE index ab6c4f34a9e..cd2bd0fa3ae 100644 --- a/src/licensedcode/data/rules/afpl-8.0_1.RULE +++ b/src/licensedcode/data/rules/afpl-8.0_1.RULE @@ -2,6 +2,10 @@ license_expression: afpl-8.0 is_license_text: yes notes: Aladin FPL v8, short +ignorable_copyrights: + - copyright is held by Aladdin Enterprises +ignorable_holders: + - Aladdin Enterprises --- Aladdin Enterprises hereby grants to anyone the permission to apply this License to their own work, as long as the entire License (including the above notices and this paragraph) is copied with no changes, additions, or deletions except for changing the first paragraph of Section 0 to include a suitable description of the work to which the license is being applied and of the person or entity that holds the copyright in the work, and, if the License is being applied to a work created in a country other than the United States, replacing the first paragraph of Section 6 with an appropriate reference to the laws of the appropriate country. diff --git a/src/licensedcode/data/rules/gpl-2.0_and_gpl-2.0-plus.RULE b/src/licensedcode/data/rules/gpl-2.0_and_gpl-2.0-plus.RULE index 45e1f71fe2a..1b2e782eb6e 100644 --- a/src/licensedcode/data/rules/gpl-2.0_and_gpl-2.0-plus.RULE +++ b/src/licensedcode/data/rules/gpl-2.0_and_gpl-2.0-plus.RULE @@ -2,6 +2,10 @@ license_expression: gpl-2.0 AND gpl-2.0-plus is_license_notice: yes minimum_coverage: 80 +ignorable_copyrights: + - copyright is held by Freescale +ignorable_holders: + - Freescale --- The portions of this file whose copyright is held by Freescale and which diff --git a/src/licensedcode/data/rules/libpng.SPDX.RULE b/src/licensedcode/data/rules/libpng.SPDX.RULE index d859942ed68..1526b8c0fbd 100644 --- a/src/licensedcode/data/rules/libpng.SPDX.RULE +++ b/src/licensedcode/data/rules/libpng.SPDX.RULE @@ -5,12 +5,12 @@ minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - - Copyright (c) 1996, 1997 Andreas Dilger Distributed + - Copyright (c) 1996, 1997 Andreas Dilger - Copyright (c) 1998, 1999 Glenn Randers-Pehrson - Copyright (c) 2000-2002 Glenn Randers-Pehrson - Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson ignorable_holders: - - Andreas Dilger Distributed + - Andreas Dilger - Glenn Randers-Pehrson - Guy Eric Schalnat, Group 42, Inc. --- diff --git a/src/licensedcode/data/rules/libpng_4.RULE b/src/licensedcode/data/rules/libpng_4.RULE index 7884b68a6b1..ca59557bafb 100644 --- a/src/licensedcode/data/rules/libpng_4.RULE +++ b/src/licensedcode/data/rules/libpng_4.RULE @@ -3,12 +3,12 @@ license_expression: libpng is_license_text: yes ignorable_copyrights: - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - - Copyright (c) 1996, 1997 Andreas Dilger Distributed + - Copyright (c) 1996, 1997 Andreas Dilger - Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson - Copyright (c) 2000-2002 Glenn Randers-Pehrson - Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson ignorable_holders: - - Andreas Dilger Distributed + - Andreas Dilger - Glenn Randers-Pehrson - Guy Eric Schalnat, Group 42, Inc. --- From 00a9abc2f93156b85c10bd0e21926663e7d865a7 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 10:41:35 +0200 Subject: [PATCH 09/30] Improve copyright detection of "distributed" Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 23 +++++++++++-------- .../data/copyrights/distributed.hpp.yml | 2 +- .../data/copyrights/misco2/distributed_0.txt | 2 ++ .../copyrights/misco2/distributed_0.txt.yml | 15 ++++++++++++ .../data/copyrights/misco2/distributed_1.txt | 2 ++ .../copyrights/misco2/distributed_1.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_10.txt | 1 + .../copyrights/misco2/distributed_10.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_2.txt | 2 ++ .../copyrights/misco2/distributed_2.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_3.txt | 1 + .../copyrights/misco2/distributed_3.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_4.txt | 8 +++++++ .../copyrights/misco2/distributed_4.txt.yml | 19 +++++++++++++++ .../data/copyrights/misco2/distributed_5.txt | 1 + .../copyrights/misco2/distributed_5.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_6.txt | 2 ++ .../copyrights/misco2/distributed_6.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_7.txt | 1 + .../copyrights/misco2/distributed_7.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_8.txt | 3 +++ .../copyrights/misco2/distributed_8.txt.yml | 11 +++++++++ .../data/copyrights/misco2/distributed_9.txt | 1 + .../copyrights/misco2/distributed_9.txt.yml | 11 +++++++++ 24 files changed, 172 insertions(+), 10 deletions(-) create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_0.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_0.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_1.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_1.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_10.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_10.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_2.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_2.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_3.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_4.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_4.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_5.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_5.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_6.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_6.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_7.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_7.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_8.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_8.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_9.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_9.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 8b89f780982..7178cd2d58f 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -280,7 +280,7 @@ def detect(self, 'EMAIL', 'URL', 'HOLDER', 'AUTHOR', 'IS', 'HELD', - + ]) non_holder_labels_mini = frozenset([ @@ -707,7 +707,7 @@ def build_detection_from_node( (r'^[Rr]éservés[\.,]*$', 'RESERVED'), (r'^[Rr]eserves[\.,]*$', 'RESERVED'), - # used to detect "copyright is held by..." + # used to detect "copyright is held by..." (r'^is$', 'IS'), (r'^are$', 'IS'), (r'^held$', 'HELD'), @@ -747,7 +747,7 @@ def build_detection_from_node( # all lower case with dashes "enforce-trailing-newline" at least 3 times (r'^((\w+-){3,}\w+)$', 'JUNK'), - + # path with trailing year-like are NOT a year as in # Landroid/icu/impl/IDNA2003 : treat as JUNK (r'^[^\\/]+[\\/][^\\/]+[\\/].*$', 'JUNK'), @@ -897,7 +897,7 @@ def build_detection_from_node( # of a copyright statement (r'^neither$', 'JUNK'), (r'^nor$', 'JUNK'), - + (r'^data-.*$', 'JUNK'), (r'^providing$', 'JUNK'), @@ -1278,7 +1278,7 @@ def build_detection_from_node( (r'^Convert$', 'NN'), (r'^Compute$', 'NN'), (r'^Case$', 'NN'), - + (r'^END$', 'NN'), (r'^Entity$', 'NN'), (r'^Example', 'NN'), @@ -2096,11 +2096,10 @@ def build_detection_from_node( # dot in: fooo at bar dot com (r'^dot$', 'DOT'), - + # moment/moment is an odd name (r'moment/moment$', 'NAME'), - ############################################################################ # catch all other as Nouns ############################################################################ @@ -2734,6 +2733,9 @@ def build_detection_from_node( # Copyright 2013-2020 by OCamlPro. COPYRIGHT2: {+ + } #22795 + # Copyright 2018 (c) DistributedLock + COPYRIGHT: { } #230020 + COPYRIGHT2: {+ ? + *} #2280 COPYRIGHT2: {+ ? + * ?} #2300 @@ -3007,6 +3009,10 @@ def build_detection_from_node( # Copyright OProfile authors COPYRIGHT: { ?+ } #83004 + # (C) Distributed Management Task Force (Distributed is an NN) + COPYRIGHT: { } #83010 + + ####################################### # Copyright is held by .... ####################################### @@ -4101,7 +4107,6 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): if TRACE_TOK: logger_debug(' prepare_text_line: after remove_printf_format_codes: ' + repr(line)) - # less common comment line prefixes line = remove_comment_markers(' ', line) if TRACE_TOK: @@ -4175,7 +4180,7 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): .replace('`', "'") .replace('"', "'") # u nicode prefix in Python strings - .replace(" u'", " '") + .replace(" u'", " '") # see https://github.com/nexB/scancode-toolkit/issues/3667 .replace('§', " ") ) diff --git a/tests/cluecode/data/copyrights/distributed.hpp.yml b/tests/cluecode/data/copyrights/distributed.hpp.yml index ac91c32d17f..54787091d19 100644 --- a/tests/cluecode/data/copyrights/distributed.hpp.yml +++ b/tests/cluecode/data/copyrights/distributed.hpp.yml @@ -4,4 +4,4 @@ what: copyrights: - Copyright 2008-2010 Gordon Woodhull holders: - - Gordon Woodhull + - Gordon Woodhull diff --git a/tests/cluecode/data/copyrights/misco2/distributed_0.txt b/tests/cluecode/data/copyrights/misco2/distributed_0.txt new file mode 100644 index 00000000000..7805a3ae6ea --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_0.txt @@ -0,0 +1,2 @@ +Copyright (c) Distributed Webs Project, LLC.
+Copyright (c) 2014 Mathias Buus diff --git a/tests/cluecode/data/copyrights/misco2/distributed_0.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_0.txt.yml new file mode 100644 index 00000000000..6352a77ad71 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_0.txt.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) Distributed Webs Project, LLC. + - Copyright (c) 2014 Mathias Buus +holders: + - Distributed Webs Project, LLC. + - Mathias Buus +holders_summary: + - value: Distributed Webs Project, LLC. + count: 1 + - value: Mathias Buus + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_1.txt b/tests/cluecode/data/copyrights/misco2/distributed_1.txt new file mode 100644 index 00000000000..c0e82872d94 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_1.txt @@ -0,0 +1,2 @@ +Copyright (c) Distributed Frontera developers. +All rights reserved. diff --git a/tests/cluecode/data/copyrights/misco2/distributed_1.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_1.txt.yml new file mode 100644 index 00000000000..8e6a8b99770 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_1.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) Distributed Frontera developers +holders: + - Distributed Frontera developers +holders_summary: + - value: Distributed Frontera developers + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_10.txt b/tests/cluecode/data/copyrights/misco2/distributed_10.txt new file mode 100644 index 00000000000..56be3bd2fb9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_10.txt @@ -0,0 +1 @@ +Copyright (C) Distributed InforMation ProcBssing Ltd. Alle Rechte Vorbehalten diff --git a/tests/cluecode/data/copyrights/misco2/distributed_10.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_10.txt.yml new file mode 100644 index 00000000000..ae9bb8c7b70 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_10.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) Distributed InforMation ProcBssing Ltd. +holders: + - Distributed InforMation ProcBssing Ltd. +holders_summary: + - value: Distributed InforMation ProcBssing Ltd. + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_2.txt b/tests/cluecode/data/copyrights/misco2/distributed_2.txt new file mode 100644 index 00000000000..aab791ce3c4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_2.txt @@ -0,0 +1,2 @@ +-- (c) Distributed Radio Limited 2016 +-- steve@distributedradio.com diff --git a/tests/cluecode/data/copyrights/misco2/distributed_2.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_2.txt.yml new file mode 100644 index 00000000000..0ecd8465536 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_2.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - (c) Distributed Radio Limited 2016 - steve@distributedradio.com +holders: + - Distributed Radio Limited +holders_summary: + - value: Distributed Radio Limited + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_3.txt b/tests/cluecode/data/copyrights/misco2/distributed_3.txt new file mode 100644 index 00000000000..56fa6e25e00 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_3.txt @@ -0,0 +1 @@ +(C) Distributed Management Task Force diff --git a/tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml new file mode 100644 index 00000000000..2c05cd0225d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - (c) Distributed Management Task Force +holders: + - Distributed Management Task Force +holders_summary: + - value: Distributed Management Task Force + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_4.txt b/tests/cluecode/data/copyrights/misco2/distributed_4.txt new file mode 100644 index 00000000000..6e3ba253f74 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_4.txt @@ -0,0 +1,8 @@ + + parallel-hashmap (c)2019-2023 Gregory Popovitch. + + + sse2neon (c) Distributed Ledger Technology Collaboration and contributors. + + + Tracy Profiler (c)2017-2023 Bartosz Taudul. diff --git a/tests/cluecode/data/copyrights/misco2/distributed_4.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_4.txt.yml new file mode 100644 index 00000000000..7d8747fc2e3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_4.txt.yml @@ -0,0 +1,19 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - (c) 2019-2023 Gregory Popovitch + - (c) Distributed Ledger Technology Collaboration and contributors + - (c) 2017-2023 Bartosz Taudul +holders: + - Gregory Popovitch + - Distributed Ledger Technology Collaboration and contributors + - Bartosz Taudul +holders_summary: + - value: Bartosz Taudul + count: 1 + - value: Distributed Ledger Technology Collaboration and contributors + count: 1 + - value: Gregory Popovitch + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_5.txt b/tests/cluecode/data/copyrights/misco2/distributed_5.txt new file mode 100644 index 00000000000..06c47352513 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_5.txt @@ -0,0 +1 @@ +Copyright 2018 (c) DistributedLock is licensed under the MIT License. diff --git a/tests/cluecode/data/copyrights/misco2/distributed_5.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_5.txt.yml new file mode 100644 index 00000000000..b2d71604994 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_5.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright 2018 (c) DistributedLock +holders: + - DistributedLock +holders_summary: + - value: DistributedLock + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_6.txt b/tests/cluecode/data/copyrights/misco2/distributed_6.txt new file mode 100644 index 00000000000..5128edbfed0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_6.txt @@ -0,0 +1,2 @@ +Copyright (c) 1996-1999 Distributed Processing Technology Corporation +All rights reserved. diff --git a/tests/cluecode/data/copyrights/misco2/distributed_6.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_6.txt.yml new file mode 100644 index 00000000000..c57a942aadc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_6.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) 1996-1999 Distributed Processing Technology Corporation +holders: + - Distributed Processing Technology Corporation +holders_summary: + - value: Distributed Processing Technology Corporation + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_7.txt b/tests/cluecode/data/copyrights/misco2/distributed_7.txt new file mode 100644 index 00000000000..651002a97c8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_7.txt @@ -0,0 +1 @@ +Copyright (c) distributed processing technology corporation all rights reserved. diff --git a/tests/cluecode/data/copyrights/misco2/distributed_7.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_7.txt.yml new file mode 100644 index 00000000000..248d9aa430c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_7.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) distributed processing technology corporation +holders: + - distributed processing technology corporation +holders_summary: + - value: distributed processing technology corporation + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_8.txt b/tests/cluecode/data/copyrights/misco2/distributed_8.txt new file mode 100644 index 00000000000..db2cda194bb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_8.txt @@ -0,0 +1,3 @@ +(c) Distributed via COMTEX News. + (c) YYYY A&G Information Services, all rights reserved. + diff --git a/tests/cluecode/data/copyrights/misco2/distributed_8.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_8.txt.yml new file mode 100644 index 00000000000..757e7168efe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_8.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - (c) Distributed via COMTEX News. (c) YYYY A&G Information Services +holders: + - Distributed via COMTEX News. YYYY A&G Information Services +holders_summary: + - value: Distributed via COMTEX News. YYYY A&G Information Services + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_9.txt b/tests/cluecode/data/copyrights/misco2/distributed_9.txt new file mode 100644 index 00000000000..69807245e3c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_9.txt @@ -0,0 +1 @@ +Copyright (c) Distributed Software System Lab. All Rights Reserved. diff --git a/tests/cluecode/data/copyrights/misco2/distributed_9.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_9.txt.yml new file mode 100644 index 00000000000..39eb454be81 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_9.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) Distributed Software System Lab +holders: + - Distributed Software System Lab +holders_summary: + - value: Distributed Software System Lab + count: 1 From dd5de6e221626fdcd050f388dc6d096d14d3ae84 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 10:52:08 +0200 Subject: [PATCH 10/30] Do not detect some words as NNP This makes copyright detection more specific Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 7178cd2d58f..cbf54687011 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -1278,6 +1278,17 @@ def build_detection_from_node( (r'^Convert$', 'NN'), (r'^Compute$', 'NN'), (r'^Case$', 'NN'), + (r'^Hessian$', 'NN'), + (r'^Include', 'NN'), + (r'^Downstream', 'NN'), + (r'^Distributions?', 'NN'), + (r'^Volumes?', 'NN'), + (r'^Manuals?.?', 'NN'), + (r'^Update.?', 'NN'), + (r'^[Ff]ormatting.?', 'JUNK'), + (r'^Lexers?.?', 'NN'), + (r'^Symbols?.?', 'NN'), + (r'^Tokens?.?', 'NN'), (r'^END$', 'NN'), (r'^Entity$', 'NN'), From 97d0bcb5f2f1b7ee6544bd802be22207221d86cc Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 10:53:22 +0200 Subject: [PATCH 11/30] Improve copyright tests Signed-off-by: Philippe Ombredanne --- tests/cluecode/data/copyrights/regents_license-LICENSE.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/cluecode/data/copyrights/regents_license-LICENSE.yml b/tests/cluecode/data/copyrights/regents_license-LICENSE.yml index 7c0f2bc403e..fe904f0ee9a 100644 --- a/tests/cluecode/data/copyrights/regents_license-LICENSE.yml +++ b/tests/cluecode/data/copyrights/regents_license-LICENSE.yml @@ -7,12 +7,16 @@ copyrights: - Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California - copyright C 1988 by the Institute of Electrical and Electronics Engineers, Inc. + - copyright of UC Berkeley's Berkeley Software holders: - The Regents of the University of California - The Regents of the University of California - the Institute of Electrical and Electronics Engineers, Inc. + - UC Berkeley's Berkeley Software holders_summary: - value: The Regents of the University of California count: 2 + - value: UC Berkeley's Berkeley Software + count: 1 - value: the Institute of Electrical and Electronics Engineers, Inc. count: 1 From 6a9663e80307bed076a6882bca358d073cdfe56b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 12:07:37 +0200 Subject: [PATCH 12/30] Detect OpenStreetMap correctly Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index cbf54687011..ba6c5fc8f99 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -741,6 +741,10 @@ def build_detection_from_node( (r'^Fu$', 'NNP'), (r'^W3C\(r\)$', 'COMP'), + # three or more AsCamelCase GetQueueReference, with some exceptions + (r'^OpenStreetMap.?$', 'NAME'), + (r'^([A-Z][a-z]+){3,}$', 'JUNK'), + ############################################################################ # JUNK proper ############################################################################ From 12b7acef844a535ff7bfbffe1b5a1f10aef7595a Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 May 2024 12:28:48 +0200 Subject: [PATCH 13/30] Add new copyright detection tests Signed-off-by: Philippe Ombredanne --- .../data/copyrights/misco2/distributed_15.txt | 2 ++ .../copyrights/misco2/distributed_15.txt.yml | 11 +++++++++++ .../data/copyrights/misco2/distributed_16.txt | 11 +++++++++++ .../copyrights/misco2/distributed_16.txt.yml | 19 +++++++++++++++++++ tests/cluecode/data/copyrights/misco2/osm.txt | 1 + .../data/copyrights/misco2/osm.txt.yml | 11 +++++++++++ 6 files changed, 55 insertions(+) create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_15.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_15.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_16.txt create mode 100644 tests/cluecode/data/copyrights/misco2/distributed_16.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco2/osm.txt create mode 100644 tests/cluecode/data/copyrights/misco2/osm.txt.yml diff --git a/tests/cluecode/data/copyrights/misco2/distributed_15.txt b/tests/cluecode/data/copyrights/misco2/distributed_15.txt new file mode 100644 index 00000000000..54c9990484b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_15.txt @@ -0,0 +1,2 @@ + g_message("! (c) 2005-2015 Dr. Johann Pfefferl"); + g_message("! (c) Distributed under the terms and conditions of the GPL"); diff --git a/tests/cluecode/data/copyrights/misco2/distributed_15.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_15.txt.yml new file mode 100644 index 00000000000..803ec8fa31f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_15.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - (c) 2005-2015 Dr. Johann Pfefferl +holders: + - Dr. Johann Pfefferl +holders_summary: + - value: Dr. Johann Pfefferl + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/distributed_16.txt b/tests/cluecode/data/copyrights/misco2/distributed_16.txt new file mode 100644 index 00000000000..c1f2ef0423a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_16.txt @@ -0,0 +1,11 @@ +Colours Icon (c) distributed under GPL (http://www.gnu.org/copyleft/gpl.html) +Designed by Lothar Grimme http://www.grafixport.org/ +Sourced from https://www.iconfinder.com/icons/11/colors_icon#size=32 + +mustache.js +------------- +The MIT License + +Copyright (c) 2009 Chris Wanstrath (Ruby) +Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) +Copyright (c) 2010-2015 The mustache.js community diff --git a/tests/cluecode/data/copyrights/misco2/distributed_16.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_16.txt.yml new file mode 100644 index 00000000000..1bd64714a0c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/distributed_16.txt.yml @@ -0,0 +1,19 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) 2009 Chris Wanstrath + - Copyright (c) 2010-2014 Jan Lehnardt + - Copyright (c) 2010-2015 The mustache.js community +holders: + - Chris Wanstrath + - Jan Lehnardt + - The mustache.js community +holders_summary: + - value: Chris Wanstrath + count: 1 + - value: Jan Lehnardt + count: 1 + - value: The mustache.js community + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/osm.txt b/tests/cluecode/data/copyrights/misco2/osm.txt new file mode 100644 index 00000000000..efc485b54eb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/osm.txt @@ -0,0 +1 @@ + © OpenStreetMap contributors. diff --git a/tests/cluecode/data/copyrights/misco2/osm.txt.yml b/tests/cluecode/data/copyrights/misco2/osm.txt.yml new file mode 100644 index 00000000000..06cf18ea90c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/osm.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - (c) OpenStreetMap contributors +holders: + - OpenStreetMap contributors +holders_summary: + - value: OpenStreetMap contributors + count: 1 From 0d7df585bf9a9a4c1a6e20535bc4d98d9e8d99e5 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 10 May 2024 09:58:40 +0200 Subject: [PATCH 14/30] Improve copyright detection side-effects Signed-off-by: Philippe Ombredanne --- src/licensedcode/data/licenses/minpack.LICENSE | 4 ++++ src/licensedcode/data/licenses/nasa-1.3.LICENSE | 4 ++-- src/licensedcode/data/rules/bsd-original-uc_14.RULE | 4 ++++ src/licensedcode/data/rules/bsd-original-uc_9.RULE | 4 ++++ src/licensedcode/data/rules/minpack_2.RULE | 4 ++++ src/licensedcode/data/rules/mpich_2.RULE | 4 ++++ src/licensedcode/data/rules/proprietary-license_637.RULE | 2 -- .../usr/share/doc/libc-bin/copyright-detailed.expected.yml | 1 + .../usr/share/doc/libc6/copyright-detailed.expected.yml | 1 + 9 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/licensedcode/data/licenses/minpack.LICENSE b/src/licensedcode/data/licenses/minpack.LICENSE index 4970a63d99a..70122cfb4e6 100644 --- a/src/licensedcode/data/licenses/minpack.LICENSE +++ b/src/licensedcode/data/licenses/minpack.LICENSE @@ -12,6 +12,10 @@ text_urls: - http://www.netlib.org/minpack/disclaimer other_urls: - https://gitlab.com/libeigen/eigen/-/blob/master/COPYING.MINPACK +ignorable_copyrights: + - Copyright Notice (1999) University of Chicago +ignorable_holders: + - University of Chicago ignorable_authors: - the University of Chicago --- diff --git a/src/licensedcode/data/licenses/nasa-1.3.LICENSE b/src/licensedcode/data/licenses/nasa-1.3.LICENSE index 7371182128d..7f73788a92f 100644 --- a/src/licensedcode/data/licenses/nasa-1.3.LICENSE +++ b/src/licensedcode/data/licenses/nasa-1.3.LICENSE @@ -17,9 +17,9 @@ other_urls: - https://opensource.org/licenses/NASA-1.3 minimum_coverage: 10 ignorable_copyrights: - - Copyright YEAR United States Government as represented by + - Copyright YEAR United States Government ignorable_holders: - - United States Government as represented by + - United States Government --- NASA OPEN SOURCE AGREEMENT VERSION 1.3 diff --git a/src/licensedcode/data/rules/bsd-original-uc_14.RULE b/src/licensedcode/data/rules/bsd-original-uc_14.RULE index 055d192d563..707a47e6edf 100644 --- a/src/licensedcode/data/rules/bsd-original-uc_14.RULE +++ b/src/licensedcode/data/rules/bsd-original-uc_14.RULE @@ -1,6 +1,10 @@ --- license_expression: bsd-original-uc is_license_notice: yes +ignorable_copyrights: + - copyright of UC Berkeley's Berkeley Software +ignorable_holders: + - UC Berkeley's Berkeley Software ignorable_authors: - UC Berkeley and its contributors - the University of California, Berkeley and its contributors diff --git a/src/licensedcode/data/rules/bsd-original-uc_9.RULE b/src/licensedcode/data/rules/bsd-original-uc_9.RULE index 435efdcc559..ce5c45d670b 100644 --- a/src/licensedcode/data/rules/bsd-original-uc_9.RULE +++ b/src/licensedcode/data/rules/bsd-original-uc_9.RULE @@ -2,6 +2,10 @@ license_expression: bsd-original-uc is_license_text: yes minimum_coverage: 90 +ignorable_copyrights: + - copyright of UC Berkeley's Berkeley Software +ignorable_holders: + - UC Berkeley's Berkeley Software ignorable_authors: - UC Berkeley and its contributors - the University of California, Berkeley and its contributors diff --git a/src/licensedcode/data/rules/minpack_2.RULE b/src/licensedcode/data/rules/minpack_2.RULE index 461c439bcbb..04eb24fecfc 100644 --- a/src/licensedcode/data/rules/minpack_2.RULE +++ b/src/licensedcode/data/rules/minpack_2.RULE @@ -1,6 +1,10 @@ --- license_expression: minpack is_license_text: yes +ignorable_copyrights: + - Copyright Notice (1999) University of Chicago +ignorable_holders: + - University of Chicago ignorable_authors: - the University of Chicago --- diff --git a/src/licensedcode/data/rules/mpich_2.RULE b/src/licensedcode/data/rules/mpich_2.RULE index c2a975af81b..1945869520d 100644 --- a/src/licensedcode/data/rules/mpich_2.RULE +++ b/src/licensedcode/data/rules/mpich_2.RULE @@ -3,6 +3,10 @@ license_expression: mpich is_license_text: yes relevance: 100 minimum_coverage: 95 +ignorable_copyrights: + - Copyright Notice 1998-2020, Argonne National Laboratory +ignorable_holders: + - Argonne National Laboratory --- COPYRIGHT diff --git a/src/licensedcode/data/rules/proprietary-license_637.RULE b/src/licensedcode/data/rules/proprietary-license_637.RULE index 1d1a80d4769..1c68f25e48f 100644 --- a/src/licensedcode/data/rules/proprietary-license_637.RULE +++ b/src/licensedcode/data/rules/proprietary-license_637.RULE @@ -2,8 +2,6 @@ license_expression: proprietary-license is_license_text: yes notes: https://github.com/menahishayan/HomeAssistant-Cupertino-Icons/blob/734b65202915e4d2a8a77072d909d8630e027b1c/LICENSE -ignorable_authors: - - Apple's SF Pro Symbols Viewer --- Icons included here are only diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml index b39c7b918d0..8018b0ddd52 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml @@ -803,6 +803,7 @@ copyright: | copyright Eric Young Copyright (c) 1992 Eric Young Collected copyright Simon Josefsson + copyright The Internet Society, Tom Tromey and Red Hat, Inc. Copyright (c) 2002, 2003, 2004, 2011 Simon Josefsson Copyright (c) 1999, 2000 Tom Tromey Copyright 2000 Red Hat, Inc. diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml index b39c7b918d0..8018b0ddd52 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml @@ -803,6 +803,7 @@ copyright: | copyright Eric Young Copyright (c) 1992 Eric Young Collected copyright Simon Josefsson + copyright The Internet Society, Tom Tromey and Red Hat, Inc. Copyright (c) 2002, 2003, 2004, 2011 Simon Josefsson Copyright (c) 1999, 2000 Tom Tromey Copyright 2000 Red Hat, Inc. From 8b2ddf5c7462095d368a8e454197a403bad6f3fe Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 10 May 2024 10:42:32 +0200 Subject: [PATCH 15/30] Enable generation of copyright test file Signed-off-by: Philippe Ombredanne --- tests/cluecode/cluecode_test_utils.py | 6 ++++-- tests/cluecode/test_copyrights.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/cluecode/cluecode_test_utils.py b/tests/cluecode/cluecode_test_utils.py index 31795ec46e7..784a4f757e3 100644 --- a/tests/cluecode/cluecode_test_utils.py +++ b/tests/cluecode/cluecode_test_utils.py @@ -126,7 +126,7 @@ def dump(self, check_exists=False): df.write(self.dumps()) -def load_copyright_tests(test_dir=test_env.test_data_dir): +def load_copyright_tests(test_dir=test_env.test_data_dir, generate_missing=False): """ Yield an iterable of CopyrightTest loaded from test data files in `test_dir`. """ @@ -134,7 +134,9 @@ def load_copyright_tests(test_dir=test_env.test_data_dir): ('copyrights', 'ics', 'holders', 'authors', 'years', 'generated')) all_test_files = chain.from_iterable( - get_test_file_pairs(td) for td in test_dirs) + get_test_file_pairs(td, generate_missing=generate_missing) + for td in test_dirs + ) for data_file, test_file in all_test_files: yield CopyrightTest(data_file, test_file) diff --git a/tests/cluecode/test_copyrights.py b/tests/cluecode/test_copyrights.py index 1b6e1967b86..3db0b9077fe 100644 --- a/tests/cluecode/test_copyrights.py +++ b/tests/cluecode/test_copyrights.py @@ -31,4 +31,8 @@ class TestCopyrightDataDriven(FileBasedTesting): pass -build_tests(copyright_tests=load_copyright_tests(), clazz=TestCopyrightDataDriven, regen=REGEN_TEST_FIXTURES) +build_tests(copyright_tests=load_copyright_tests( + generate_missing=REGEN_TEST_FIXTURES), + clazz=TestCopyrightDataDriven, + regen=REGEN_TEST_FIXTURES, +) From 1fc7ceaf6b71b98a54dd56a24a0108339efa03e3 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 10 May 2024 10:52:56 +0200 Subject: [PATCH 16/30] Improve copyright debug tracing Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 63 ++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index ba6c5fc8f99..ab6ff50bcdf 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -45,7 +45,7 @@ def logger_debug(*args): pass -if TRACE or TRACE_DEEP or TRACE_TOK: +if TRACE or TRACE_TOK: import logging logger = logging.getLogger(__name__) @@ -55,6 +55,9 @@ def logger_debug(*args): def logger_debug(*args): return logger.debug(' '.join(isinstance(a, str) and a or repr(a) for a in args)) +if TRACE_DEEP: + logger_debug = print + """ Detect and collect copyright statements. @@ -175,13 +178,11 @@ def detect_copyrights_from_lines( ) for candidates in candidate_lines_groups: - if TRACE: - from pprint import pformat - can = pformat(candidates, width=160) - logger_debug( - f' detect_copyrights_from_lines: processing candidates group:\n' - f' {can}' - ) + if TRACE or TRACE_DEEP: + logger_debug(f'\n========================================================================') + logger_debug(f'detect_copyrights_from_lines: processing candidates group:') + for can in candidates: + logger_debug(f' {can}') detections = detector.detect( numbered_lines=candidates, @@ -259,14 +260,17 @@ def detect(self, # first, POS tag each token using token regexes lexed_text = list(self.lexer.lex_tokens(tokens, trace=TRACE_TOK)) - if TRACE: - logger_debug(f'CopyrightDetector: lexed tokens: {lexed_text}') + if TRACE or TRACE_DEEP: + logger_debug(f'CopyrightDetector: lexed tokens:') + for l in lexed_text: + logger_debug(f' {l!r}') # then build a parse parse_tree based on tagged tokens parse_tree = self.parser.parse(lexed_text) - if TRACE: - logger_debug(f'CopyrightDetector: parse_tree:\n{tree_pformat(parse_tree)}') + if TRACE or TRACE_DEEP: + logger_debug('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') + logger_debug(f'CopyrightDetector: final parse_tree:\n{tree_pformat(parse_tree)}') non_copyright_labels = frozenset() if not include_copyright_years: @@ -316,8 +320,8 @@ def detect(self, junk=COPYRIGHTS_JUNK, ) - if TRACE: - logger_debug(f'CopyrightDetector: detection: {copyrght}') + if TRACE or TRACE_DEEP: + logger_debug(f'CopyrightDetector: final copyright: {copyrght}') if copyrght: if include_copyrights: @@ -500,8 +504,6 @@ def build_detection_from_node( else: leaves = node.leaves() - # if TRACE_DEEP: logger_debug(' starting leaves:', leaves) - if include_copyright_allrights: filtered = leaves else: @@ -3940,15 +3942,13 @@ def candidate_lines(numbered_lines): if TRACE_TOK: numbered_lines = list(numbered_lines) - logger_debug( - f'candidate_lines: numbered_lines: {numbered_lines!r}') + logger_debug(f'candidate_lines: numbered_lines: {numbered_lines!r}') # the previous line (chars only) previous_chars = None for numbered_line in numbered_lines: if TRACE: - logger_debug( - f'# candidate_lines: evaluating line: {numbered_line!r}') + logger_debug(f'# candidate_lines: evaluating line: {numbered_line!r}') _line_number, line = numbered_line @@ -3962,10 +3962,7 @@ def candidate_lines(numbered_lines): if TRACE: cands = list(candidates) - logger_debug( - ' candidate_lines: is EOS: yielding candidates\n' - f' {cands}r\n\n' - ) + logger_debug(f' candidate_lines: is EOS: yielding candidates\n {cands!r}\n') yield list(candidates) candidates_clear() @@ -3978,7 +3975,8 @@ def candidate_lines(numbered_lines): candidates_append(numbered_line) previous_chars = chars_only - if TRACE: logger_debug(' candidate_lines: line is candidate') + if TRACE: + logger_debug(' candidate_lines: line is candidate') elif 's>' in line: # this is for debian-style copyright name tags @@ -4011,10 +4009,7 @@ def candidate_lines(numbered_lines): # completely empty or only made of punctuations if TRACE: cands = list(candidates) - logger_debug( - ' candidate_lines: empty: yielding candidates\n' - f' {cands}r\n\n' - ) + logger_debug(f' candidate_lines: empty: yielding candidates\n {cands!r}\n') yield list(candidates) candidates_clear() @@ -4031,10 +4026,7 @@ def candidate_lines(numbered_lines): elif candidates: if TRACE: cands = list(candidates) - logger_debug( - ' candidate_lines: not in COP: yielding candidates\n' - f' {cands}r\n\n' - ) + logger_debug(f' candidate_lines: not in COP: yielding candidates\n {cands!r}\n') yield list(candidates) candidates_clear() @@ -4045,10 +4037,7 @@ def candidate_lines(numbered_lines): if candidates: if TRACE: cands = list(candidates) - logger_debug( - 'candidate_lines: finally yielding candidates\n' - f' {cands}r\n\n' - ) + logger_debug(f'candidate_lines: finally yielding candidates\n {cands!r}\n') yield list(candidates) From b0a6e26c8e8e01a577d3092840d3aab3a34957b6 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 10 May 2024 10:56:30 +0200 Subject: [PATCH 17/30] Detect new form of copyright Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 3 +++ .../cluecode/data/copyrights/misco2/devs-of-rand.txt | 1 + .../data/copyrights/misco2/devs-of-rand.txt.yml | 12 ++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 tests/cluecode/data/copyrights/misco2/devs-of-rand.txt create mode 100644 tests/cluecode/data/copyrights/misco2/devs-of-rand.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index ab6ff50bcdf..a75a686e759 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2755,6 +2755,9 @@ def build_detection_from_node( COPYRIGHT2: {+ ? + *} #2280 + # using #2280 above: Copyright 2018 Developers of the Rand project + COPYRIGHT: { } #2280.123 + COPYRIGHT2: {+ ? + * ?} #2300 # Copyright (c) 2014, 2015, the respective contributors All rights reserved. diff --git a/tests/cluecode/data/copyrights/misco2/devs-of-rand.txt b/tests/cluecode/data/copyrights/misco2/devs-of-rand.txt new file mode 100644 index 00000000000..888fb48d36e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/devs-of-rand.txt @@ -0,0 +1 @@ +Copyright 2018 Developers of the Rand project diff --git a/tests/cluecode/data/copyrights/misco2/devs-of-rand.txt.yml b/tests/cluecode/data/copyrights/misco2/devs-of-rand.txt.yml new file mode 100644 index 00000000000..e360b46fe52 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/devs-of-rand.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright 2018 Developers of the Rand project +holders: + - Developers of the Rand project +holders_summary: + - value: Developers of the Rand project + count: 1 From 7ff3f8e31df75eaaf604715e512f68c520d224ab Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 12 May 2024 15:42:33 +0200 Subject: [PATCH 18/30] Do not add arbitrary space around markup Signed-off-by: Philippe Ombredanne --- src/textcode/markup.py | 2 +- ...am_fonts-ttf_malayalam_fonts.copyright.yml | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/textcode/markup.py b/src/textcode/markup.py index ce860ade86f..002a300fa2b 100644 --- a/src/textcode/markup.py +++ b/src/textcode/markup.py @@ -140,4 +140,4 @@ def demarkup_text(text): continue else: cleaned_append(token) - return u' '.join(cleaned) + return ''.join(cleaned) diff --git a/tests/cluecode/data/copyrights/ttf_malayalam_fonts-ttf_malayalam_fonts.copyright.yml b/tests/cluecode/data/copyrights/ttf_malayalam_fonts-ttf_malayalam_fonts.copyright.yml index 185eb182879..329ac026a45 100644 --- a/tests/cluecode/data/copyrights/ttf_malayalam_fonts-ttf_malayalam_fonts.copyright.yml +++ b/tests/cluecode/data/copyrights/ttf_malayalam_fonts-ttf_malayalam_fonts.copyright.yml @@ -7,10 +7,10 @@ copyrights: Venugopalan - Copyright (c) 2004 Kevin & Siji - Copyright (c) Suresh P - - Copyright (c) 2007 Hiran Venugopalan , Hussain K H , Suresh P , Swathanthra Malayalam Computing - - Copyright (c) 2007 Hussain K H , Suresh P , Swathanthra Malayalam Computing - - Copyright (c) 2005 Rachana Akshara Vedi Chitrajakumar R , Hussain KH , Rajeev Sebastian - , Gangadharan N , Vijayakumaran Nair , Subash Kuraiakose + - Copyright (c) 2007 Hiran Venugopalan, Hussain K H, Suresh P, Swathanthra Malayalam Computing + - Copyright (c) 2007 Hussain K H, Suresh P, Swathanthra Malayalam Computing + - Copyright (c) 2005 Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, + Gangadharan N, Vijayakumaran Nair, Subash Kuraiakose) - Copyright (c) CDAC, Mumbai Font Design - Copyright (c) 2003 Modular Infotech, Pune, INDIA - Copyright (c) 2006 Modular Infotech Pvt Ltd. @@ -19,10 +19,10 @@ holders: - Jeroen Hellingman , N.V Shaji , Hiran Venugopalan - Kevin & Siji - Suresh P - - Hiran Venugopalan , Hussain K H , Suresh P , Swathanthra Malayalam Computing - - Hussain K H , Suresh P , Swathanthra Malayalam Computing - - Rachana Akshara Vedi Chitrajakumar R , Hussain KH , Rajeev Sebastian , Gangadharan N , Vijayakumaran - Nair , Subash Kuraiakose + - Hiran Venugopalan, Hussain K H, Suresh P, Swathanthra Malayalam Computing + - Hussain K H, Suresh P, Swathanthra Malayalam Computing + - Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, Gangadharan N, Vijayakumaran + Nair, Subash Kuraiakose) - CDAC, Mumbai Font Design - Modular Infotech, Pune, INDIA - Modular Infotech Pvt Ltd. @@ -30,9 +30,9 @@ holders: holders_summary: - value: CDAC, Mumbai Font Design count: 1 - - value: Hiran Venugopalan , Hussain K H , Suresh P , Swathanthra Malayalam Computing + - value: Hiran Venugopalan, Hussain K H, Suresh P, Swathanthra Malayalam Computing count: 1 - - value: Hussain K H , Suresh P , Swathanthra Malayalam Computing + - value: Hussain K H, Suresh P, Swathanthra Malayalam Computing count: 1 - value: Jeroen Hellingman , N.V Shaji , Hiran Venugopalan count: 1 @@ -42,8 +42,8 @@ holders_summary: count: 1 - value: Modular Infotech, Pune, INDIA count: 1 - - value: Rachana Akshara Vedi Chitrajakumar R , Hussain KH , Rajeev Sebastian , Gangadharan - N , Vijayakumaran Nair , Subash Kuraiakose + - value: Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, Gangadharan + N, Vijayakumaran Nair, Subash Kuraiakose) count: 1 - value: Red Hat count: 1 From 850edc1718312f893809d81a956c76098c6b983e Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Mon, 13 May 2024 23:59:16 +0200 Subject: [PATCH 19/30] Improve handle of parens in copyright Also improve NOTICEs, and other misc. variants Don not detect "The Initial Developer" Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 93 +++++++++++++------ .../copyrights/libcdio10-libcdio.label.yml | 2 +- .../copyrights/misco2/initial-dev.txt.yml | 3 +- .../misco2/regexhq/regexhq-025.txt.yml | 3 +- 4 files changed, 70 insertions(+), 31 deletions(-) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index a75a686e759..3e0daec8a8d 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -687,8 +687,7 @@ def build_detection_from_node( (r'^all$', 'NN'), (r'^ALL$', 'NN'), (r'^NO$', 'NN'), - (r'^No$', 'NN'), - (r'^no$', 'NN'), + (r'^Some$', 'NN'), (r'^[Rr]ights?$', 'RIGHT'), (r'^RIGHTS?$', 'RIGHT'), @@ -709,13 +708,34 @@ def build_detection_from_node( (r'^[Rr]éservés[\.,]*$', 'RESERVED'), (r'^[Rr]eserves[\.,]*$', 'RESERVED'), + # in Spanish Reservados todos los derechos + (r'^[Rr]eservados[\.,]*$', 'RESERVED'), + (r'^[Tt]odos$', 'NN'), + (r'^[Ll]os$', 'NN'), + (r'^[Dr]erechos$', 'RIGHT'), + + # in Dutch Alle rechten voorbehouden. + (r'^[Aa]lle$', 'NN'), + (r'^[Rr]echten$', 'RIGHT'), + (r'^[Vv]oorbehouden[\.,]*$', 'RESERVED'), + + # in German Alle Rechte vorbehalten + (r'^[Aa]lle$', 'NN'), + (r'^[Rr]echte$', 'RIGHT'), + (r'^[Vv]orbehalten[\.,]*$', 'RESERVED'), + # used to detect "copyright is held by..." (r'^is$', 'IS'), (r'^are$', 'IS'), (r'^held$', 'HELD'), - # TODO: in Dutch Alle rechten voorbehouden. - # TODO: in Spanish Reservados todos los derechos + # NOTICE are a thing in some copyright statements, but not all + (r'^NOTICE$', 'NOTICE'), + (r'^NOTICES?[\.,]$', 'JUNK'), + + (r'^[Nn]otice$', 'NOTICE'), + (r'^[Nn]otices?[\.,]$', 'JUNK'), + (r'^[Nn]otices?$', 'JUNK'), ############################################################################ # JUNK are things to ignore @@ -734,17 +754,23 @@ def build_detection_from_node( # short two chars as B3 (r"^[A-Z][0-9]$", 'NN'), - # Short words skipping some leading caps + # 2-letters short words, skipping some leading caps (r'^[BEFHJMNPQRTUVW][a-z]$', 'NN'), - # misc exceptions + # Misc exceptions (r'^dead_horse$', 'NN'), (r'^A11yance', 'NNP'), (r'^Fu$', 'NNP'), (r'^W3C\(r\)$', 'COMP'), - # three or more AsCamelCase GetQueueReference, with some exceptions - (r'^OpenStreetMap.?$', 'NAME'), + # Three or more AsCamelCase GetQueueReference, with some exceptions + (r'^(?:OpenStreetMap|AliasDotCom|AllThingsTalk).?$', 'NAME'), + + (r'^Re-Creating$', 'JUNK'), + (r'^[Nn]o$', 'JUNK'), + (r'^Earth$', 'NN'), + (r'^Maps/Google$', 'NN'), + (r'^([A-Z][a-z]+){3,}$', 'JUNK'), ############################################################################ @@ -788,7 +814,7 @@ def build_detection_from_node( (r'^[Oo]riginally?$', 'JUNK'), (r'^[Rr]epresentations?\.?$', 'JUNK'), (r'^works,$', 'JUNK'), - + (r'^grant$', 'JUNK'), (r'^Refer$', 'JUNK'), (r'^Apt$', 'JUNK'), (r'^Agreement$', 'JUNK'), @@ -829,7 +855,7 @@ def build_detection_from_node( (r'^[Cc]opyrighting$', 'JUNK'), (r'^[Aa]uthori.*$', 'JUNK'), (r'^such$', 'JUNK'), - (r'^[Aa]ssignments?[.,]?$', 'JUNK'), + (r'^[Aa]ssignments?[\.,]?$', 'JUNK'), (r'^[Bb]uild$', 'JUNK'), (r'^[Ss]tring$', 'JUNK'), (r'^Implementation-Vendor$', 'JUNK'), @@ -912,6 +938,7 @@ def build_detection_from_node( (r'^Should$', 'JUNK'), (r'^[Ll]icensing\@?$', 'JUNK'), (r'^Disclaimer$', 'JUNK'), + (r'^Directive.?$', 'JUNK'), (r'^LAWS\,?$', 'JUNK'), (r'^[Ll]aws?,?$', 'JUNK'), (r'^me$', 'JUNK'), @@ -1087,7 +1114,7 @@ def build_detection_from_node( (r'^GA$', 'JUNK'), (r'^unzip$', 'JUNK'), (r'^EULA', 'JUNK'), - (r'^Terms?[.,]?$', 'JUNK'), + (r'^Terms?[\.,]?$', 'JUNK'), (r'^Non-Assertion$', 'JUNK'), # this is not Copr. @@ -1277,9 +1304,9 @@ def build_detection_from_node( (r'^Education$', 'NN'), (r'^Extended', 'NN'), (r'^Every$', 'NN'), + (r'^Exhibit$', 'NN'), (r'^Digitized', 'NN'), (r'^[Ds]istributed?.?$', 'NN'), - (r'^Multiply$', 'NN'), (r'^Convert$', 'NN'), (r'^Compute$', 'NN'), @@ -1295,7 +1322,7 @@ def build_detection_from_node( (r'^Lexers?.?', 'NN'), (r'^Symbols?.?', 'NN'), (r'^Tokens?.?', 'NN'), - + (r'^Initial', 'NN'), (r'^END$', 'NN'), (r'^Entity$', 'NN'), (r'^Example', 'NN'), @@ -1393,9 +1420,8 @@ def build_detection_from_node( (r'^Neither$', 'NN'), (r'^Norwegian$', 'NN'), (r'^Notes?$', 'NN'), - (r'^NOTICE[\.\,]?$', 'NN'), - (r'^[Nn]otices?[\.,]?$', 'NN'), (r'^NOT$', 'NN'), + (r'^Nessus$', 'NN'), (r'^NULL$', 'NN'), (r'^Objects?$', 'NN'), (r'^Open$', 'NN'), @@ -1488,7 +1514,7 @@ def build_detection_from_node( (r'^Vendor', 'NN'), (r'^VIEW$', 'NN'), (r'^Visit', 'NN'), - (r'^Website', 'NN'), + # (r'^Website', 'NN'), (r'^Wheel$', 'NN'), (r'^Win32$', 'NN'), (r'^Work', 'NN'), @@ -1593,6 +1619,8 @@ def build_detection_from_node( (r'^Message[A-Z]', 'JUNK'), (r'^Short[a-z]*[A-Z]+[a-z]*', 'JUNK'), + (r'^[Ww]ebsites?[\.,]?', 'JUNK'), + # files (r'^.*\.java$', 'NN'), @@ -1705,7 +1733,7 @@ def build_detection_from_node( (r'^[A-Z][a-z]+[\.,]+(LTD|LTd|LtD|Ltd|ltd|lTD|lTd|ltD).?,?$', 'COMP'), # company suffix - (r'^[Ii]nc[.]?[,\.]?\)?$', 'COMP'), + (r'^[Ii]nc[\.]?[,\.]?\)?$', 'COMP'), (r'^Incorporated[,\.]?\)?$', 'COMP'), # ,Inc. suffix without spaces is directly a company name @@ -1779,7 +1807,7 @@ def build_detection_from_node( # (dutch and belgian) company suffix (r'^[Bb]\.?[Vv]\.?|BVBA$', 'COMP'), # university - (r'^\(?[Uu]niv(?:[.]|ersit(?:y|e|at?|ad?))[\.,\)]*$', 'UNI'), + (r'^\(?[Uu]niv(?:[\.]|ersit(?:y|e|at?|ad?))[\.,\)]*$', 'UNI'), (r'^UNIVERSITY$', 'UNI'), (r'^College$', 'UNI'), # Academia/ie @@ -2117,6 +2145,12 @@ def build_detection_from_node( # moment/moment is an odd name (r'moment/moment$', 'NAME'), + # single parens are special + (r'^[\(\)]$', 'PARENS'), + + # some punctuation combos + (r'^(?:=>|->|<-|<=)$', 'JUNK'), + ############################################################################ # catch all other as Nouns ############################################################################ @@ -2366,6 +2400,7 @@ def build_detection_from_node( # Copyright 2018, OpenCensus Authors COPYRIGHT: {+ } #1579991 + NAME-YEAR: { + ?} #5612 #Academy of Motion Picture Arts and Sciences @@ -2455,7 +2490,8 @@ def build_detection_from_node( # Timothy Terriberry, CSIRO, and other contributors ANDCO: { +} #960 - COMPANY: { +} #970 + # Copyright © 1998-2009 Bill Spitzak (spitzak@users.sourceforge.net ) and others, + COMPANY: { ? +} #970 # de Nemours and Company NAME: {? +} #980 @@ -2565,6 +2601,9 @@ def build_detection_from_node( # The Rand Project Developers COMPANY: { } #19603 + # Copyright (C) 1998-2001 VideoLAN ( Johan Bilien and Gildas Bazin ) + NAME: { } #19653 + ################################# #COPYRIGHT: { } #1802 ###### @@ -2755,7 +2794,7 @@ def build_detection_from_node( COPYRIGHT2: {+ ? + *} #2280 - # using #2280 above: Copyright 2018 Developers of the Rand project + # using #2280 above: Copyright 2018 Developers of the Rand project COPYRIGHT: { } #2280.123 COPYRIGHT2: {+ ? + * ?} #2300 @@ -2803,7 +2842,7 @@ def build_detection_from_node( COPYRIGHT: { } #2610 #copyright notice (3dfx Interactive, Inc. 1999), - COPYRIGHT: { } #2620 + COPYRIGHT: { } #2620 # Copyright (C) <2013>, GENIVI Alliance, Inc. COPYRIGHT: { } #2625 @@ -3032,6 +3071,9 @@ def build_detection_from_node( # (C) Distributed Management Task Force (Distributed is an NN) COPYRIGHT: { } #83010 + # Copyright (c) 2014 The Rust Project Developers + COPYRIGHT: { } #83020 + ####################################### # Copyright is held by .... @@ -3214,11 +3256,10 @@ def refine_holder(h): h = h.strip('/ ~') h = strip_solo_quotes(h) h = h.replace('( ', ' ').replace(' )', ' ') - h = h.strip() - h = h.strip('+-') + h = h.strip('+- ') h = strip_trailing_period(h) - h = h.strip() - h = h.strip('+-') + h = h.strip('+- ') + h = ' '.join(h.split()) if h and h.lower() not in HOLDERS_JUNK: return h @@ -3325,7 +3366,7 @@ def refine_names(s, prefixes): r'^copyright \(c\)$', r'^\(c\) by$', - r"\(c\) [a-z][a-z] \(c\)", + r"\(c\) [a-zA-Z][a-z] \(c\)", r"^copyright holder or simply", r"^copyright notice\.", r"^copyright of uc berkeley's berkeley software distribution", diff --git a/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml b/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml index e52246af6a5..dd75e64e8a1 100644 --- a/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml +++ b/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml @@ -20,7 +20,7 @@ copyrights: - Copyright (c) 1985, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - Copyright (c) 2003 Matthias Drochner - - Copyright (c) 1998-2001 VideoLAN Johan Bilien and Gildas Bazin + - Copyright (c) 1998-2001 VideoLAN ( Johan Bilien and Gildas Bazin ) - Copyright (c) 1992, 1993 Eric Youngdale - Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 Rocky Bernstein and Herbert Valerio Riedel holders: diff --git a/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml b/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml index 434ecef8ad9..4e51d367749 100644 --- a/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml @@ -3,5 +3,4 @@ what: - holders - holders_summary - authors -authors: - - the Initial Developer + diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml index bb149491cf4..81873c68ea5 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml @@ -4,5 +4,4 @@ what: - authors copyrights: - Copyright (c) 2007 -authors: - - the Initial Developer + From f3f2c780418c5ebf5f2ae409114e480668dfaed8 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 7 Jun 2024 14:40:43 +0200 Subject: [PATCH 20/30] Correctly filter copyrights in licenses #3797 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reference: https://github.com/nexB/scancode-toolkit/issues/3797 Reported-by: Jörg Arndt @Joerki Signed-off-by: Philippe Ombredanne --- src/cluecode/plugin_filter_clues.py | 102 +++-- .../data/licenses/ricebsd.LICENSE | 2 +- ...complex_4_line_statement_in_text-9.txt.yml | 6 +- ...h_lead_copy_sign_and_debian_s_tags.txt.yml | 6 +- .../data/plugin_filter_clues/files/LICENSE4 | 379 ++++++++++++++++++ .../filtered-expected.json | 30 -- .../filtered-expected3.json | 50 +-- .../filtered-expected4.json | 340 ++++++++++++++++ tests/cluecode/test_plugin_filter_clues.py | 16 +- 9 files changed, 810 insertions(+), 121 deletions(-) create mode 100644 tests/cluecode/data/plugin_filter_clues/files/LICENSE4 create mode 100644 tests/cluecode/data/plugin_filter_clues/filtered-expected4.json diff --git a/src/cluecode/plugin_filter_clues.py b/src/cluecode/plugin_filter_clues.py index 987d30c69ec..a00197fc6c8 100644 --- a/src/cluecode/plugin_filter_clues.py +++ b/src/cluecode/plugin_filter_clues.py @@ -7,6 +7,12 @@ # See https://aboutcode.org for more information about nexB OSS projects. # +""" +Filter out or ignore, as in "remove" redundant or irrelevant detected clues such as copyrights, +authors, emails, and urls that are already contained in a matched license text or license rule and +treated as ignorable. +""" + from itertools import chain import attr @@ -63,22 +69,24 @@ def process_codebase(self, codebase, **kwargs): if TRACE: logger_debug('RedundantFilter:process_codebase') from licensedcode.cache import get_index + rules_by_id = get_index().rules_by_id for resource in codebase.walk(): - filtered = filter_ignorable_resource_clues(resource, get_index().rules_by_id) + filtered = filter_ignorable_resource_clues(resource=resource, rules_by_id=rules_by_id) if filtered: filtered.save(codebase) def filter_ignorable_resource_clues(resource, rules_by_id): """ - Filter ignorable clues from the `resource` Resource objects using all the - scan details attached to that `resource` and the `rules_by_id` mapping of - {identifier: license Rule object}. Return the `resource` object modified in- - place if it was modified. + Filter ignorable clues from the ``resource`` Resource object using all the + scan details attached to that ``resource`` and the ``rules_by_id`` mapping of + {identifier: license Rule object}. Return the ``resource`` object modified in- + place if it was modified, or None otherwise. """ detections = Detections.from_resource(resource) - filtered = filter_ignorable_clues(detections, rules_by_id) + filtered = filter_ignorable_clues(detections=detections, rules_by_id=rules_by_id) + logger_debug(f'filter_ignorable_resource_clues: {filtered}') if filtered: if hasattr(resource, 'emails'): resource.emails = filtered.emails @@ -97,8 +105,7 @@ def filter_ignorable_resource_clues(resource, rules_by_id): class Ignorable(object): # a frozenset of matched line numbers lines_range = attr.ib() - # either a string or a frozenset of strings, such that we can test for `x in - # value` + # either a string or a frozenset of strings, such that we can test for `x in value` value = attr.ib() @@ -119,20 +126,22 @@ class Detections(object): urls = attr.ib(default=attr.Factory(list)) emails = attr.ib(default=attr.Factory(list)) - licenses = attr.ib(default=attr.Factory(list)) + license_matches = attr.ib(default=attr.Factory(list)) # this is the same as author and copyrights, but restructured to be in the # same format as ignorables and is used to filter emails and urls in authors # and copyright - copyrights_as_ignorable = attr.ib(default=attr.Factory(list), repr=False) - holders_as_ignorable = attr.ib(default=attr.Factory(list), repr=False) - authors_as_ignorable = attr.ib(default=attr.Factory(list), repr=False) + copyrights_as_ignorable = attr.ib(default=attr.Factory(list)) + holders_as_ignorable = attr.ib(default=attr.Factory(list)) + authors_as_ignorable = attr.ib(default=attr.Factory(list)) @staticmethod def from_scan_data(data): detected_copyrights = data.get('copyrights', []) detected_authors = data.get('authors', []) detected_holders = data.get('holders', []) + detected_emails = data.get('emails', []) + detected_urls = data.get('urls', []) copyrights_as_ignorable = frozenset( Ignorable( @@ -155,19 +164,23 @@ def from_scan_data(data): for a in detected_authors ) - return Detections( + license_matches = list(chain.from_iterable(d['matches'] for d in data['license_detections'])) + + detections = Detections( copyrights=detected_copyrights, - emails=data.get('emails', []), - urls=data.get('urls', []), + emails=detected_emails, + urls=detected_urls, holders=detected_holders, authors=detected_authors, - authors_as_ignorable=authors_as_ignorable, copyrights_as_ignorable=copyrights_as_ignorable, holders_as_ignorable=holders_as_ignorable, + authors_as_ignorable=authors_as_ignorable, - licenses=data.get('licenses', []), + license_matches=license_matches, ) + detections.debug() + return detections @staticmethod def from_resource(resource): @@ -185,11 +198,21 @@ def as_iterable(self): (('url', c) for c in self.urls), ) + def debug(self): + if TRACE: + logger_debug('Detections') + for nv in self.as_iterable(): + logger_debug(' ', nv), + + logger_debug(' copyrights_as_ignorable:', self.copyrights_as_ignorable) + logger_debug(' holders_as_ignorable: ', self.holders_as_ignorable) + logger_debug(' authors_as_ignorable: ', self.authors_as_ignorable) + logger_debug(' license_matches: ', self.license_matches) + def is_empty(clues): if clues: - return not any([ - clues.copyrights, clues.holders, clues.authors, clues.urls, clues.emails]) + return not any([clues.copyrights, clues.holders, clues.authors, clues.urls, clues.emails]) else: # The logic is reversed, so a false or None "clues" object returns None, which # is interpreted as False (i.e., the object is *not* empty). @@ -204,18 +227,22 @@ def filter_ignorable_clues(detections, rules_by_id): """ if is_empty(detections): return + if TRACE: + logger_debug('filter_ignorable_clues: detections') + detections.debug() no_detected_ignorables = not detections.copyrights and not detections.authors - ignorables = collect_ignorables(detections.licenses, rules_by_id) - - no_ignorables = not detections.licenses or is_empty(ignorables) + ignorables = collect_ignorables(license_matches=detections.license_matches, rules_by_id=rules_by_id) + no_ignorables = not detections.license_matches or is_empty(ignorables) if TRACE: logger_debug('ignorables', ignorables) # logger_debug('detections', detections) if no_ignorables and no_detected_ignorables: + if TRACE: + logger_debug('filter_ignorable_clues: NO IGNORABLES') return # discard redundant emails if ignorable or in a detections copyright or author @@ -307,9 +334,9 @@ def filter_values(attributes, ignorables, value_key='copyright', strip=''): def collect_ignorables(license_matches, rules_by_id): """ - Collect and return an Ignorables object built from ``license_matches`` - matched licenses list of "licenses" objects returned in ScanCode JSON - results and the ``rules_by_id`` mapping of Rule objects by identifier. + Collect and return an Ignorables object built from ``license_matches`` list of license matches + as returned in ScanCode results license_detection and the ``rules_by_id`` mapping of Rule + objects by rule identifier. The value of each ignorable list of clues is a set of (set of lines number, set of ignorable values). @@ -321,6 +348,8 @@ def collect_ignorables(license_matches, rules_by_id): copyrights = set() if not license_matches: + if TRACE: + logger_debug('collect_ignorables: No ignorables!!!!') return Ignorables( copyrights=frozenset(copyrights), holders=frozenset(holders), @@ -328,31 +357,30 @@ def collect_ignorables(license_matches, rules_by_id): urls=frozenset(urls), emails=frozenset(emails), ) - # build tuple of (set of lines number, set of ignorbale values) - for lic in license_matches: + + # build tuple of (set of lines number, set of ignorable values) + for licmat in license_matches: if TRACE: - logger_debug('collect_ignorables: license:', lic['key'], lic['score']) + logger_debug('collect_ignorables: license_match:', licmat['license_expression'], licmat['score']) - matched_rule = lic.get('matched_rule', {}) - rid = matched_rule.get('identifier') - match_coverage = matched_rule.get('match_coverage', 0) + rid = licmat['rule_identifier'] + if not rid: + # we are missing the license match details, we can only skip + if TRACE: logger_debug(' collect_ignorables: skipping, no RID') + continue # ignore poor partial matches # TODO: there must be a better way using coverage + match_coverage = float(licmat['match_coverage']) if match_coverage < 90: if TRACE: logger_debug(' collect_ignorables: skipping, match_coverage under 90%') continue - if not rid: - # we are missing the license match details, we can only skip - if TRACE: logger_debug(' collect_ignorables: skipping, no RID') - continue - rule = rules_by_id[rid] - lines_range = frozenset(range(lic['start_line'], lic['end_line'] + 1)) + lines_range = frozenset(range(licmat['start_line'], licmat['end_line'] + 1)) ign_copyrights = frozenset(rule.ignorable_copyrights or []) if ign_copyrights: diff --git a/src/licensedcode/data/licenses/ricebsd.LICENSE b/src/licensedcode/data/licenses/ricebsd.LICENSE index f0e58c31b1b..ab8564a7361 100644 --- a/src/licensedcode/data/licenses/ricebsd.LICENSE +++ b/src/licensedcode/data/licenses/ricebsd.LICENSE @@ -11,7 +11,7 @@ other_urls: - https://github.com/search?q="Also%2C+we+ask+that+use+of+ARPACK+is+properly"&type=code have this ignorable_copyrights: - - (c) 2001, Rice University + - Copyright (c) 2001, Rice University ignorable_holders: - Rice University ignorable_authors: diff --git a/tests/cluecode/data/copyrights/complex_4_line_statement_in_text-9.txt.yml b/tests/cluecode/data/copyrights/complex_4_line_statement_in_text-9.txt.yml index fabf87f1aaa..238642b4db9 100644 --- a/tests/cluecode/data/copyrights/complex_4_line_statement_in_text-9.txt.yml +++ b/tests/cluecode/data/copyrights/complex_4_line_statement_in_text-9.txt.yml @@ -4,13 +4,13 @@ what: - holders_summary copyrights: - Copyright 2002 Jonas Borgstrom 2002 Daniel Lundin - 2002 CodeFactory AB + 2002 CodeFactory AB. - Copyright (c) 1994 The Regents of the University of California holders: - - Jonas Borgstrom Daniel Lundin CodeFactory AB + - Jonas Borgstrom Daniel Lundin CodeFactory AB. - The Regents of the University of California holders_summary: - - value: Jonas Borgstrom Daniel Lundin CodeFactory AB + - value: Jonas Borgstrom Daniel Lundin CodeFactory AB. count: 1 - value: The Regents of the University of California count: 1 diff --git a/tests/cluecode/data/copyrights/copytest/with_lead_copy_sign_and_debian_s_tags.txt.yml b/tests/cluecode/data/copyrights/copytest/with_lead_copy_sign_and_debian_s_tags.txt.yml index f56053e922e..23564906910 100644 --- a/tests/cluecode/data/copyrights/copytest/with_lead_copy_sign_and_debian_s_tags.txt.yml +++ b/tests/cluecode/data/copyrights/copytest/with_lead_copy_sign_and_debian_s_tags.txt.yml @@ -4,12 +4,12 @@ what: - holders_summary copyrights: - Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies) - - (c) 1994-2008 Trolltech ASA + - (c) 1994-2008 Trolltech ASA. holders: - Nokia Corporation and/or its subsidiary(-ies) - - Trolltech ASA + - Trolltech ASA. holders_summary: - value: Nokia Corporation and/or its subsidiary(-ies) count: 1 - - value: Trolltech ASA + - value: Trolltech ASA. count: 1 diff --git a/tests/cluecode/data/plugin_filter_clues/files/LICENSE4 b/tests/cluecode/data/plugin_filter_clues/files/LICENSE4 new file mode 100644 index 00000000000..e7c0b65bcdb --- /dev/null +++ b/tests/cluecode/data/plugin_filter_clues/files/LICENSE4 @@ -0,0 +1,379 @@ +This software is copyright (c) 2013 by Mark Jason Dominus . + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +Terms of the Perl programming language system itself + +a) the GNU General Public License as published by the Free + Software Foundation; either version 1, or (at your option) any + later version, or +b) the "Artistic License" + +--- The GNU General Public License, Version 1, February 1989 --- + +This software is Copyright (c) 2013 by Mark Jason Dominus . + +This is free software, licensed under: + + The GNU General Public License, Version 1, February 1989 + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; 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 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! + + +--- The Artistic License 1.0 --- + +This software is Copyright (c) 2013 by Mark Jason Dominus . + +This is free software, licensed under: + + The Artistic License 1.0 + +The Artistic License + +Preamble + +The intent of this document is to state the conditions under which a Package +may be copied, such that the Copyright Holder maintains some semblance of +artistic control over the development of the package, while giving the users of +the package the right to use and distribute the Package in a more-or-less +customary fashion, plus the right to make reasonable modifications. + +Definitions: + + - "Package" refers to the collection of files distributed by the Copyright + Holder, and derivatives of that collection of files created through + textual modification. + - "Standard Version" refers to such a Package if it has not been modified, + or has been modified in accordance with the wishes of the Copyright + Holder. + - "Copyright Holder" is whoever is named in the copyright or copyrights for + the package. + - "You" is you, if you're thinking about copying or distributing this Package. + - "Reasonable copying fee" is whatever you can justify on the basis of media + cost, duplication charges, time of people involved, and so on. (You will + not be required to justify it to the Copyright Holder, but only to the + computing community at large as a market that must bear the fee.) + - "Freely Available" means that no fee is charged for the item itself, though + there may be fees involved in handling the item. It also means that + recipients of the item may redistribute it under the same conditions they + received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications derived +from the Public Domain or from the Copyright Holder. A Package modified in such +a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided that +you insert a prominent notice in each changed file stating how and when you +changed that file, and provided that you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or an + equivalent medium, or placing the modifications on a major archive site + such as ftp.uu.net, or by allowing the Copyright Holder to include your + modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict with + standard executables, which must also be provided, and provide a separate + manual page for each non-standard executable that clearly documents how it + differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or executable +form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where to + get the Standard Version. + + b) accompany the distribution with the machine-readable source of the Package + with your modifications. + + c) accompany any non-standard executables with their corresponding Standard + Version executables, giving the non-standard executables non-standard + names, and clearly documenting the differences in manual pages (or + equivalent), together with instructions on where to get the Standard + Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this Package. You +may not charge a fee for this Package itself. However, you may distribute this +Package in aggregate with other (possibly commercial) programs as part of a +larger (possibly commercial) software distribution provided that you do not +advertise this Package as a product of your own. + +6. The scripts and library files supplied as input to or produced as output +from the programs of this Package do not automatically fall under the copyright +of this Package, but belong to whomever generated them, and may be sold +commercially, and may be aggregated with this Package. + +7. C or perl subroutines supplied by you and linked into this Package shall not +be considered part of this Package. + +8. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End + diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected.json index 4bfec66a9e4..e3193ec5301 100644 --- a/tests/cluecode/data/plugin_filter_clues/filtered-expected.json +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected.json @@ -76,20 +76,10 @@ "start_line": 2, "end_line": 3 }, - { - "copyright": "Copyright (c) The Apache Software Foundation", - "start_line": 14, - "end_line": 14 - }, { "copyright": "Copyright (c) The Eclipse Foundation https://eclipse.org", "start_line": 41, "end_line": 42 - }, - { - "copyright": "copyright (c) 1999, International Business Machines, Inc., http://www.ibm.com", - "start_line": 67, - "end_line": 68 } ], "holders": [ @@ -98,20 +88,10 @@ "start_line": 2, "end_line": 2 }, - { - "holder": "The Apache Software Foundation", - "start_line": 14, - "end_line": 14 - }, { "holder": "The Eclipse Foundation", "start_line": 41, "end_line": 41 - }, - { - "holder": "International Business Machines, Inc.", - "start_line": 67, - "end_line": 68 } ], "authors": [ @@ -120,11 +100,6 @@ "start_line": 5, "end_line": 5 }, - { - "author": "the Apache Software Foundation (http://www.apache.org/)", - "start_line": 31, - "end_line": 32 - }, { "author": "John Doe", "start_line": 44, @@ -136,11 +111,6 @@ "email": "foo@eclipse.org", "start_line": 4, "end_line": 4 - }, - { - "email": "apache@apache.org", - "start_line": 39, - "end_line": 39 } ], "urls": [], diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json index 4b3c1211551..45102df52ad 100644 --- a/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected3.json @@ -70,51 +70,11 @@ ], "license_clues": [], "percentage_of_license_text": 100.0, - "copyrights": [ - { - "copyright": "Copyright (c) 1997-2001 University of Cambridge", - "start_line": 11, - "end_line": 11 - }, - { - "copyright": "copyright by the University of Cambridge, England", - "start_line": 26, - "end_line": 27 - } - ], - "holders": [ - { - "holder": "University of Cambridge", - "start_line": 11, - "end_line": 11 - }, - { - "holder": "the University of Cambridge, England", - "start_line": 26, - "end_line": 27 - } - ], - "authors": [ - { - "author": "Philip Hazel", - "start_line": 26, - "end_line": 26 - } - ], - "emails": [ - { - "email": "ph10@cam.ac.uk", - "start_line": 8, - "end_line": 8 - } - ], - "urls": [ - { - "url": "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/", - "start_line": 33, - "end_line": 33 - } - ], + "copyrights": [], + "holders": [], + "authors": [], + "emails": [], + "urls": [], "files_count": 0, "dirs_count": 0, "size_count": 0, diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected4.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected4.json new file mode 100644 index 00000000000..cf493480449 --- /dev/null +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected4.json @@ -0,0 +1,340 @@ +{ + "license_detections": [ + { + "identifier": "gpl_1_0_plus_or_artistic_1_0__and_gpl_1_0_and_artistic_1_0_and_warranty_disclaimer-a1de207d-6b62-18b8-f372-e9820f733de3", + "license_expression": "(gpl-1.0-plus OR artistic-1.0) AND gpl-1.0 AND artistic-1.0 AND warranty-disclaimer", + "license_expression_spdx": "(GPL-1.0-or-later OR Artistic-1.0) AND GPL-1.0-only AND Artistic-1.0 AND LicenseRef-scancode-warranty-disclaimer", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "gpl-1.0-plus OR artistic-1.0", + "license_expression_spdx": "GPL-1.0-or-later OR Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 3, + "end_line": 11, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 59, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0-plus_or_artistic-1.0_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_or_artistic-1.0_2.RULE" + }, + { + "license_expression": "gpl-1.0", + "license_expression_spdx": "GPL-1.0-only", + "from_file": "LICENSE4", + "start_line": 13, + "end_line": 13, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 9, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0_10.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0_10.RULE" + }, + { + "license_expression": "gpl-1.0", + "license_expression_spdx": "GPL-1.0-only", + "from_file": "LICENSE4", + "start_line": 17, + "end_line": 19, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 15, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0_37.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0_37.RULE" + }, + { + "license_expression": "gpl-1.0", + "license_expression_spdx": "GPL-1.0-only", + "from_file": "LICENSE4", + "start_line": 21, + "end_line": 270, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2039, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-1.0.LICENSE" + }, + { + "license_expression": "artistic-1.0", + "license_expression_spdx": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 273, + "end_line": 273, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "artistic-1.0_9.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_9.RULE" + }, + { + "license_expression": "artistic-1.0", + "license_expression_spdx": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 277, + "end_line": 279, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 11, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "artistic-1.0_7.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_7.RULE" + }, + { + "license_expression": "artistic-1.0", + "license_expression_spdx": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 281, + "end_line": 281, + "matcher": "2-aho", + "score": 90.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 90, + "rule_identifier": "artistic-1.0_11.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_11.RULE" + }, + { + "license_expression": "artistic-1.0", + "license_expression_spdx": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 283, + "end_line": 372, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 729, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "artistic-1.0_4.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_4.RULE" + }, + { + "license_expression": "warranty-disclaimer", + "license_expression_spdx": "LicenseRef-scancode-warranty-disclaimer", + "from_file": "LICENSE4", + "start_line": 374, + "end_line": 376, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 26, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "warranty-disclaimer_72.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/warranty-disclaimer_72.RULE" + } + ] + } + ], + "files": [ + { + "path": "LICENSE4", + "type": "file", + "name": "LICENSE4", + "base_name": "LICENSE4", + "extension": "", + "size": 18407, + "sha1": "8a2e40b4eb23cc05a0b78330d919a7ffacde7a9a", + "md5": "d5d03e14130735213e0532277df33cab", + "sha256": "e4bd79e88b577d66d351597c0d4114b9ee2e31f0544795e87a88ca1b0dd38383", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "detected_license_expression": "(gpl-1.0-plus OR artistic-1.0) AND gpl-1.0 AND artistic-1.0 AND warranty-disclaimer", + "detected_license_expression_spdx": "(GPL-1.0-or-later OR Artistic-1.0) AND GPL-1.0-only AND Artistic-1.0 AND LicenseRef-scancode-warranty-disclaimer", + "license_detections": [ + { + "license_expression": "(gpl-1.0-plus OR artistic-1.0) AND gpl-1.0 AND artistic-1.0 AND warranty-disclaimer", + "license_expression_spdx": "(GPL-1.0-or-later OR Artistic-1.0) AND GPL-1.0-only AND Artistic-1.0 AND LicenseRef-scancode-warranty-disclaimer", + "matches": [ + { + "license_expression": "gpl-1.0-plus OR artistic-1.0", + "spdx_license_expression": "GPL-1.0-or-later OR Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 3, + "end_line": 11, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 59, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0-plus_or_artistic-1.0_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_or_artistic-1.0_2.RULE" + }, + { + "license_expression": "gpl-1.0", + "spdx_license_expression": "GPL-1.0-only", + "from_file": "LICENSE4", + "start_line": 13, + "end_line": 13, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 9, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0_10.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0_10.RULE" + }, + { + "license_expression": "gpl-1.0", + "spdx_license_expression": "GPL-1.0-only", + "from_file": "LICENSE4", + "start_line": 17, + "end_line": 19, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 15, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0_37.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0_37.RULE" + }, + { + "license_expression": "gpl-1.0", + "spdx_license_expression": "GPL-1.0-only", + "from_file": "LICENSE4", + "start_line": 21, + "end_line": 270, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2039, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-1.0.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-1.0.LICENSE" + }, + { + "license_expression": "artistic-1.0", + "spdx_license_expression": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 273, + "end_line": 273, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "artistic-1.0_9.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_9.RULE" + }, + { + "license_expression": "artistic-1.0", + "spdx_license_expression": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 277, + "end_line": 279, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 11, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "artistic-1.0_7.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_7.RULE" + }, + { + "license_expression": "artistic-1.0", + "spdx_license_expression": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 281, + "end_line": 281, + "matcher": "2-aho", + "score": 90.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 90, + "rule_identifier": "artistic-1.0_11.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_11.RULE" + }, + { + "license_expression": "artistic-1.0", + "spdx_license_expression": "Artistic-1.0", + "from_file": "LICENSE4", + "start_line": 283, + "end_line": 372, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 729, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "artistic-1.0_4.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/artistic-1.0_4.RULE" + }, + { + "license_expression": "warranty-disclaimer", + "spdx_license_expression": "LicenseRef-scancode-warranty-disclaimer", + "from_file": "LICENSE4", + "start_line": 374, + "end_line": 376, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 26, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "warranty-disclaimer_72.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/warranty-disclaimer_72.RULE" + } + ], + "identifier": "gpl_1_0_plus_or_artistic_1_0__and_gpl_1_0_and_artistic_1_0_and_warranty_disclaimer-a1de207d-6b62-18b8-f372-e9820f733de3" + } + ], + "license_clues": [], + "percentage_of_license_text": 98.57, + "copyrights": [ + { + "copyright": "copyright (c) 2013 by Mark Jason Dominus ", + "start_line": 1, + "end_line": 1 + }, + { + "copyright": "Copyright (c) 2013 by Mark Jason Dominus ", + "start_line": 15, + "end_line": 15 + }, + { + "copyright": "Copyright (c) 2013 by Mark Jason Dominus ", + "start_line": 275, + "end_line": 275 + } + ], + "holders": [ + { + "holder": "Mark Jason Dominus", + "start_line": 1, + "end_line": 1 + }, + { + "holder": "Mark Jason Dominus", + "start_line": 15, + "end_line": 15 + }, + { + "holder": "Mark Jason Dominus", + "start_line": 275, + "end_line": 275 + } + ], + "authors": [], + "emails": [], + "urls": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/cluecode/test_plugin_filter_clues.py b/tests/cluecode/test_plugin_filter_clues.py index 77c85c6499a..9e5fb950d92 100644 --- a/tests/cluecode/test_plugin_filter_clues.py +++ b/tests/cluecode/test_plugin_filter_clues.py @@ -18,7 +18,6 @@ from scancode_config import REGEN_TEST_FIXTURES - test_env = FileDrivenTesting() test_env.test_data_dir = os.path.join(os.path.dirname(__file__), 'data') @@ -34,7 +33,7 @@ def test_is_empty_(): def test_scan_plugin_filter_clues_for_rule(): - # this test fies is a copy of apache-1.1_63.RULE that contains + # this test file is a copy of apache-1.1_63.RULE that contains # several emails, authors, urls and copyrights # it has been modified to include more unrelated clues test_dir = test_env.get_test_loc('plugin_filter_clues/files/LICENSE') @@ -67,3 +66,16 @@ def test_scan_plugin_filter_clues_for_license(): run_scan_click(args) expected = test_env.get_test_loc('plugin_filter_clues/filtered-expected3.json') check_json_scan(expected, result_file, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + + +# Regression on data structure tracked in https://github.com/nexB/scancode-toolkit/issues/3797 +def test_scan_plugin_filter_copyrights_for_license(): + # this test fies is a copy of pcre.LICENSE that contains + # several emails, authors, urls + test_dir = test_env.get_test_loc('plugin_filter_clues/files/LICENSE4') + result_file = test_env.get_temp_file('json') + args = ['-clieu', '--filter-clues', test_dir, '--json', result_file] + run_scan_click(args) + expected = test_env.get_test_loc('plugin_filter_clues/filtered-expected4.json', must_exist=False) + check_json_scan(expected, result_file, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + From 461fd65403ebea6ad96462c89803ce47f61b600d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 7 Jun 2024 14:52:41 +0200 Subject: [PATCH 21/30] Improve copyright detection Handle corner cases with markup Detect new copyright forms. Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 51 +++++++++++++------ src/textcode/markup.py | 4 +- .../debian_lib_1-libmono_cairo_cil.label.yml | 31 ++++++----- ...bian_lib_2-libmono_cairo_cil.copyright.yml | 31 ++++++----- ...n_lib_3-libmono_security_cil.copyright.yml | 27 +++++----- ...i_names_on_one_line-libgdata.copyright.yml | 48 ++++++++--------- .../libfltk1_1-libfltk.copyright.yml | 2 +- .../libspeex1-libspeex.copyright.yml | 6 +-- .../misco2/copyrighted-complex.txt.yml | 12 +++-- .../data/copyrights/partial_detection.txt.yml | 9 ++-- .../copyrights/partial_detection_mit.txt.yml | 9 ++-- ...rse_plugins-seahorse_plugins.copyright.yml | 19 ++++--- .../score/no_license_ambiguity-expected.json | 11 ++-- 13 files changed, 142 insertions(+), 118 deletions(-) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 3e0daec8a8d..b646ec4565a 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2237,7 +2237,8 @@ def build_detection_from_node( # BY GEORGE J. CARRETTE NAME: { } #85 - DASHCAPS: { } + DASHCAPS: { } #899999 + # INRIA - CIRAD - INRA COMPANY: { +} #1280 @@ -2266,7 +2267,7 @@ def build_detection_from_node( COMPANY: { +?} #180 # Commonwealth Scientific and Industrial Research Organisation (CSIRO) - COMPANY: { } + COMPANY: { } #190 COMPANY: { *} #200 @@ -2334,6 +2335,9 @@ def build_detection_from_node( # Academy of Motion Picture Arts NAME: {+ +} #351 + # Distributed Management Task Force + # NAME: { {3}} #881111 + # @author Stephane Hillion NAME: { ? ? } #351.1 @@ -2452,7 +2456,7 @@ def build_detection_from_node( COMPANY: { +} #800 # by the Institute of Electrical and Electronics Engineers, Inc. - COMPANY: { } + COMPANY: { } #805 COMPANY: { } #810 # A community of developers @@ -2461,9 +2465,12 @@ def build_detection_from_node( # Copyright (c) 2002-2010 The ANGLE Project Authors COMPANY: { + ?} #820 + ANDCO: { ? } #825 + # this is catching a wide net by treating any bare URL as a company COMPANY: {? } #830 + COMPANY: { } #840 # the Software and Component Technologies group of Trimble Navigation, Ltd. @@ -2543,10 +2550,10 @@ def build_detection_from_node( COMPANY: { + } #1420 # the Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation - COMPANY: { +} + COMPANY: { +} #1422 - # Copyright (c) 1998-2000 University College London - COMPANY: { } + # Copyright (c) 1998-2000 University College London #1423 + COMPANY: { } #1427 # "And" some name ANDCO: {+ +?} #1430 @@ -2589,8 +2596,8 @@ def build_detection_from_node( # Copyright 2015 The Error Prone Authors. NAME: { } #196023 - # Copyright (C) Suresh P #19601 - NAME: { } + # Copyright (C) Suresh P + NAME: { } #19601.1 # Copyright or Copr. Mines Paristech, France - Mark NOBLE, Alexandrine GESRET NAME: { } #19601 @@ -2739,13 +2746,13 @@ def build_detection_from_node( COPYRIGHT: { } #2274 # Copyright 1994-2007 (c) RealNetworks, Inc. - COPYRIGHT: {+ } #2274 + COPYRIGHT: {+ } #2275 # Copyright (c) 2017 Contributors et.al. COPYRIGHT: { } #2276 #Copyright (c) 2020 Contributors as noted in the AUTHORS file - COPYRIGHT: { * ? * } + COPYRIGHT: { * ? * } #2277.1 # copyrighted by Object Computing, Inc., St. Louis Missouri, Copyright (C) 2002, all rights reserved. COPYRIGHT: { + } #2278 @@ -2922,9 +2929,9 @@ def build_detection_from_node( COPYRIGHT2: { } # 2010 # copyright C 1988 by the Institute of Electrical and Electronics Engineers, Inc. - COPYRIGHT: { } + COPYRIGHT: { } #2274.1 - COPYRIGHT2: { } #2274 + COPYRIGHT2: { } #2274.2 # (C) COPYRIGHT 2004 UNIVERSITY OF CHICAGO COPYRIGHT: { } #2276 @@ -3069,7 +3076,7 @@ def build_detection_from_node( COPYRIGHT: { ?+ } #83004 # (C) Distributed Management Task Force (Distributed is an NN) - COPYRIGHT: { } #83010 + # COPYRIGHT: { } #83010 # Copyright (c) 2014 The Rust Project Developers COPYRIGHT: { } #83020 @@ -4030,7 +4037,16 @@ def candidate_lines(numbered_lines): previous_chars = chars_only if TRACE: - logger_debug(' candidate_lines: line is candidate') + logger_debug(' candidate_lines: line is candidate') + + elif 'http' in line: + # this is for copyright listing many URLs + in_copyright = 2 + candidates_append(numbered_line) + + previous_chars = chars_only + if TRACE: + logger_debug(' candidate_lines: line is HTTP candidate') elif in_copyright > 0: # these are a sign that the copyrights continue after @@ -4045,6 +4061,7 @@ def candidate_lines(numbered_lines): 'copyrights', 'and', 'by', + ',', )) ) and not has_trailing_year(previous_chars) @@ -4177,8 +4194,12 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): .replace('( C)', ' (c) ') .replace('(C)', ' (c) ') .replace('(c)', ' (c) ') - # the case of \251 is tested by 'weirdencoding.h' + .replace('( © )', ' (c) ') + .replace('(©)', ' (c) ') + .replace('(© )', ' (c) ') + .replace('( ©)', ' (c) ') .replace('©', ' (c) ') + # the case of \251 is tested by 'weirdencoding.h' .replace('\251', ' (c) ') .replace('©', ' (c) ') .replace('©', ' (c) ') diff --git a/src/textcode/markup.py b/src/textcode/markup.py index 002a300fa2b..8b403e234c3 100644 --- a/src/textcode/markup.py +++ b/src/textcode/markup.py @@ -136,8 +136,8 @@ def demarkup_text(text): cleaned_append = cleaned.append for token in tags_and_ents: tlow = token.lower() - if tlow.startswith(('<', '&', 'href',)) and not any(k in tlow for k in kept_tags): - continue + if tlow.startswith(('<', '/>', '&', 'href',)) and not any(k in tlow for k in kept_tags): + cleaned_append(' ') else: cleaned_append(token) return ''.join(cleaned) diff --git a/tests/cluecode/data/copyrights/debian_lib_1-libmono_cairo_cil.label.yml b/tests/cluecode/data/copyrights/debian_lib_1-libmono_cairo_cil.label.yml index a0316e30be8..61a541490ca 100644 --- a/tests/cluecode/data/copyrights/debian_lib_1-libmono_cairo_cil.label.yml +++ b/tests/cluecode/data/copyrights/debian_lib_1-libmono_cairo_cil.label.yml @@ -7,20 +7,19 @@ copyrights: - Copyright (c) 2001-2005 Novell - Copyright (c) Microsoft Corporation - Copyright (c) 2007 James Newton-King - - Copyright (c) 2002-2004 James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie - Poole + - Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Copyright (c) 2000-2004 Philip A. Craig - - Portions Copyright (c) 2002-2004 James W. Newkirk , Michael C. Two , Alexei A. Vorontsov - , Charlie Poole + - Portions Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, + Charlie Poole - Copyright (c) 2000-2004 Philip A. Craig - Copyright (c) 2007, 2008 LShift Ltd. - Copyright (c) 2007, 2008 Cohesive Financial Technologies LLC. - Copyright (c) 2007, 2008 Rabbit Technologies Ltd. - - Copyright (c) 2007, 2008 LShift Ltd. , Cohesive Financial Technologies LLC., and Rabbit - Technologies Ltd. - - Copyright (c) 2007, 2008 LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit - Technologies Ltd. - - Copyright (c) 2007 LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies + - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies + Ltd. + - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies + Ltd. + - Copyright (c) 2007 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - Copyright (c) ???? Simon Mourier holders: @@ -28,21 +27,21 @@ holders: - Novell - Microsoft Corporation - James Newton-King - - James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Philip A. Craig - - James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Philip A. Craig - LShift Ltd. - Cohesive Financial Technologies LLC. - Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - Simon Mourier holders_summary: - - value: LShift Ltd. , Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + - value: LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. count: 3 - - value: James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - value: James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole count: 2 - value: Philip A. Craig count: 2 diff --git a/tests/cluecode/data/copyrights/debian_lib_2-libmono_cairo_cil.copyright.yml b/tests/cluecode/data/copyrights/debian_lib_2-libmono_cairo_cil.copyright.yml index da4ca679b7b..ecb3b0639d5 100644 --- a/tests/cluecode/data/copyrights/debian_lib_2-libmono_cairo_cil.copyright.yml +++ b/tests/cluecode/data/copyrights/debian_lib_2-libmono_cairo_cil.copyright.yml @@ -7,20 +7,19 @@ copyrights: - Copyright (c) 2001-2005 Novell - Copyright (c) Microsoft Corporation - Copyright (c) 2007 James Newton-King - - Copyright (c) 2002-2004 James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie - Poole + - Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Copyright (c) 2000-2004 Philip A. Craig - - Portions Copyright (c) 2002-2004 James W. Newkirk , Michael C. Two , Alexei A. Vorontsov - , Charlie Poole + - Portions Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, + Charlie Poole - Copyright (c) 2000-2004 Philip A. Craig - Copyright (c) 2007, 2008 LShift Ltd. - Copyright (c) 2007, 2008 Cohesive Financial Technologies LLC. - Copyright (c) 2007, 2008 Rabbit Technologies Ltd. - - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC. , and Rabbit - Technologies Ltd. - - Copyright (c) 2007, 2008 LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit - Technologies Ltd. - - Copyright (c) 2007 LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies + - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies + Ltd. + - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies + Ltd. + - Copyright (c) 2007 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - Copyright (c) ???? Simon Mourier holders: @@ -28,21 +27,21 @@ holders: - Novell - Microsoft Corporation - James Newton-King - - James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Philip A. Craig - - James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Philip A. Craig - LShift Ltd. - Cohesive Financial Technologies LLC. - Rabbit Technologies Ltd. - - LShift Ltd., Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - Simon Mourier holders_summary: - - value: LShift Ltd., Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. + - value: LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. count: 3 - - value: James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - value: James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole count: 2 - value: Philip A. Craig count: 2 diff --git a/tests/cluecode/data/copyrights/debian_lib_3-libmono_security_cil.copyright.yml b/tests/cluecode/data/copyrights/debian_lib_3-libmono_security_cil.copyright.yml index 9eaabd275b5..ecb3b0639d5 100644 --- a/tests/cluecode/data/copyrights/debian_lib_3-libmono_security_cil.copyright.yml +++ b/tests/cluecode/data/copyrights/debian_lib_3-libmono_security_cil.copyright.yml @@ -7,19 +7,18 @@ copyrights: - Copyright (c) 2001-2005 Novell - Copyright (c) Microsoft Corporation - Copyright (c) 2007 James Newton-King - - Copyright (c) 2002-2004 James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie - Poole + - Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Copyright (c) 2000-2004 Philip A. Craig - - Portions Copyright (c) 2002-2004 James W. Newkirk , Michael C. Two , Alexei A. Vorontsov - , Charlie Poole + - Portions Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, + Charlie Poole - Copyright (c) 2000-2004 Philip A. Craig - Copyright (c) 2007, 2008 LShift Ltd. - Copyright (c) 2007, 2008 Cohesive Financial Technologies LLC. - Copyright (c) 2007, 2008 Rabbit Technologies Ltd. - - Copyright (c) 2007, 2008 LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit - Technologies Ltd. - - Copyright (c) 2007, 2008 LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit - Technologies Ltd. + - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies + Ltd. + - Copyright (c) 2007, 2008 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies + Ltd. - Copyright (c) 2007 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - Copyright (c) ???? Simon Mourier @@ -28,21 +27,21 @@ holders: - Novell - Microsoft Corporation - James Newton-King - - James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Philip A. Craig - - James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole - Philip A. Craig - LShift Ltd. - Cohesive Financial Technologies LLC. - Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. - - LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. - Simon Mourier holders_summary: - - value: LShift Ltd. , Cohesive Financial Technologies LLC. , and Rabbit Technologies Ltd. + - value: LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. count: 3 - - value: James W. Newkirk , Michael C. Two , Alexei A. Vorontsov , Charlie Poole + - value: James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole count: 2 - value: Philip A. Craig count: 2 diff --git a/tests/cluecode/data/copyrights/debian_multi_names_on_one_line-libgdata.copyright.yml b/tests/cluecode/data/copyrights/debian_multi_names_on_one_line-libgdata.copyright.yml index 744d1337b95..785af3905a1 100644 --- a/tests/cluecode/data/copyrights/debian_multi_names_on_one_line-libgdata.copyright.yml +++ b/tests/cluecode/data/copyrights/debian_multi_names_on_one_line-libgdata.copyright.yml @@ -4,22 +4,22 @@ what: - holders_summary copyrights: - Copyright 1999-2004 Ximian, Inc. 1999-2005 Novell, Inc. - - copyright 2000-2003 Ximian, Inc. , 2003 Gergo Erdi - - copyright 2000 Eskil Heyn Olsen , 2000 Ximian, Inc. - - copyright 1998 The Free Software Foundation , 2000 Ximian, Inc. + - copyright 2000-2003 Ximian, Inc., 2003 Gergo Erdi + - copyright 2000 Eskil Heyn Olsen, 2000 Ximian, Inc. + - copyright 1998 The Free Software Foundation, 2000 Ximian, Inc. - copyright 1998-2005 The OpenLDAP Foundation - - Copyright 1999-2003 The OpenLDAP Foundation , Redwood City, California, USA. - - Copyright 1999-2000 Eric Busboom , The Software Studio (http://www.softwarestudio.org) 2001 + - Copyright 1999-2003 The OpenLDAP Foundation, Redwood City, California, USA. + - Copyright 1999-2000 Eric Busboom, The Software Studio (http://www.softwarestudio.org) 2001 Critical Path - - (c) Copyright 1996 Apple Computer , Inc., AT&T Corp. , International Business Machines Corporation + - (c) Copyright 1996 Apple Computer, Inc., AT&T Corp., International Business Machines Corporation and Siemens Rolm Communications Inc. - Copyright (c) 1997 Theo de Raadt - copyright 2000 Andrea Campi - copyright 2002 Andrea Campi - copyright 2003 Andrea Campi - Copyright 2002 Jonas Borgstrom 2002 Daniel Lundin - 2002 CodeFactory AB - - copyright 1996 Apple Computer, Inc. , AT&T Corp. , International Business Machines Corporation + 2002 CodeFactory AB. + - copyright 1996 Apple Computer, Inc., AT&T Corp., International Business Machines Corporation and Siemens Rolm Communications Inc. - copyright 1986-2000 Hiram Clawson - copyright 1997 Theo de Raadt @@ -28,20 +28,20 @@ copyrights: - Copyright (c) 1990, 1993, 1994, 1995 The Regents of the University of California holders: - Ximian, Inc. Novell, Inc. - - Ximian, Inc. , Gergo Erdi - - Eskil Heyn Olsen , Ximian, Inc. - - The Free Software Foundation , Ximian, Inc. + - Ximian, Inc., Gergo Erdi + - Eskil Heyn Olsen, Ximian, Inc. + - The Free Software Foundation, Ximian, Inc. - The OpenLDAP Foundation - - The OpenLDAP Foundation , Redwood City, California, USA. - - Eric Busboom , The Software Studio Critical Path - - Apple Computer , Inc., AT&T Corp. , International Business Machines Corporation and Siemens + - The OpenLDAP Foundation, Redwood City, California, USA. + - Eric Busboom, The Software Studio Critical Path + - Apple Computer, Inc., AT&T Corp., International Business Machines Corporation and Siemens Rolm Communications Inc. - Theo de Raadt - Andrea Campi - Andrea Campi - Andrea Campi - - Jonas Borgstrom Daniel Lundin CodeFactory AB - - Apple Computer, Inc. , AT&T Corp. , International Business Machines Corporation and Siemens + - Jonas Borgstrom Daniel Lundin CodeFactory AB. + - Apple Computer, Inc., AT&T Corp., International Business Machines Corporation and Siemens Rolm Communications Inc. - Hiram Clawson - Theo de Raadt @@ -51,32 +51,32 @@ holders: holders_summary: - value: Andrea Campi count: 3 - - value: Apple Computer , Inc., AT&T Corp. , International Business Machines Corporation and + - value: Apple Computer, Inc., AT&T Corp., International Business Machines Corporation and Siemens Rolm Communications Inc. count: 2 - value: Theo de Raadt count: 2 - - value: Eric Busboom , The Software Studio Critical Path + - value: Eric Busboom, The Software Studio Critical Path count: 1 - - value: Eskil Heyn Olsen , Ximian, Inc. + - value: Eskil Heyn Olsen, Ximian, Inc. count: 1 - value: Hiram Clawson count: 1 - - value: Jonas Borgstrom Daniel Lundin CodeFactory AB + - value: Jonas Borgstrom Daniel Lundin CodeFactory AB. count: 1 - value: Keith Bostic count: 1 - value: Sleepycat Software count: 1 - - value: The Free Software Foundation , Ximian, Inc. + - value: The Free Software Foundation, Ximian, Inc. count: 1 - value: The OpenLDAP Foundation count: 1 - - value: The OpenLDAP Foundation , Redwood City, California, USA. + - value: The OpenLDAP Foundation, Redwood City, California, USA. count: 1 - value: The Regents of the University of California count: 1 - - value: Ximian, Inc. , Gergo Erdi - count: 1 - value: Ximian, Inc. Novell, Inc. count: 1 + - value: Ximian, Inc., Gergo Erdi + count: 1 diff --git a/tests/cluecode/data/copyrights/libfltk1_1-libfltk.copyright.yml b/tests/cluecode/data/copyrights/libfltk1_1-libfltk.copyright.yml index d224af48703..fd57e90ee8c 100644 --- a/tests/cluecode/data/copyrights/libfltk1_1-libfltk.copyright.yml +++ b/tests/cluecode/data/copyrights/libfltk1_1-libfltk.copyright.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2009 Bill Spitzak (spitzak@users.sourceforge.net ) and others + - Copyright (c) 1998-2009 Bill Spitzak (spitzak@users.sourceforge.net) and others holders: - Bill Spitzak and others holders_summary: diff --git a/tests/cluecode/data/copyrights/libspeex1-libspeex.copyright.yml b/tests/cluecode/data/copyrights/libspeex1-libspeex.copyright.yml index d1cd61a378b..88239e54218 100644 --- a/tests/cluecode/data/copyrights/libspeex1-libspeex.copyright.yml +++ b/tests/cluecode/data/copyrights/libspeex1-libspeex.copyright.yml @@ -9,7 +9,7 @@ copyrights: - Copyright 2005-2007 Commonwealth Scientific and Industrial Research Organisation (CSIRO) - Copyright 1993, 2002, 2006 David Rowe - Copyright 2003 EpicGames - - Copyright 1992-1994 Jutta Degener , Carsten Bormann + - Copyright 1992-1994 Jutta Degener, Carsten Bormann holders: - Xiph.org Foundation - Jean-Marc Valin @@ -17,7 +17,7 @@ holders: - Commonwealth Scientific and Industrial Research Organisation (CSIRO) - David Rowe - EpicGames - - Jutta Degener , Carsten Bormann + - Jutta Degener, Carsten Bormann holders_summary: - value: Analog Devices Inc. count: 1 @@ -29,7 +29,7 @@ holders_summary: count: 1 - value: Jean-Marc Valin count: 1 - - value: Jutta Degener , Carsten Bormann + - value: Jutta Degener, Carsten Bormann count: 1 - value: Xiph.org Foundation count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml b/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml index 0d406a9732d..13191e53638 100644 --- a/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml @@ -4,10 +4,14 @@ what: - holders_summary - authors copyrights: - - copyrighted by http://www.dre.vanderbilt.edu/~schmidt/ Douglas C. Schmidt - - Copyright (c) 1993-2009 + - copyrighted by http://www.dre.vanderbilt.edu/~schmidt/ Douglas C. Schmidt and his http://www.cs.wustl.edu/~schmidt/ACE-members.html' + research group at http://www.wustl.edu/ Washington University, http://www.uci.edu' University + of California, Irvine, and http://www.vanderbilt.edu' Vanderbilt University, Copyright (c) + 1993-2009 holders: - - Douglas C. Schmidt + - Douglas C. Schmidt and his research group at Washington University, University of California, + Irvine, and Vanderbilt University holders_summary: - - value: Douglas C. Schmidt + - value: Douglas C. Schmidt and his research group at Washington University, University of + California, Irvine, and Vanderbilt University count: 1 diff --git a/tests/cluecode/data/copyrights/partial_detection.txt.yml b/tests/cluecode/data/copyrights/partial_detection.txt.yml index b691edd98e7..3b0b0cc4525 100644 --- a/tests/cluecode/data/copyrights/partial_detection.txt.yml +++ b/tests/cluecode/data/copyrights/partial_detection.txt.yml @@ -6,8 +6,8 @@ copyrights: - Copyright 1991 by the Massachusetts Institute of Technology - Copyright (c) 2001 AT&T - Copyright (c) 2004-2006 by Henrique de Moraes Holschuh - - Copyright 2005-2007 Christopher Montgomery , Jean-Marc Valin , Timothy Terriberry , CSIRO - , and other contributors + - Copyright 2005-2007 Christopher Montgomery, Jean-Marc Valin, Timothy Terriberry, CSIRO, + and other contributors - Copyright (c) 2007 James Newton-King - Copyright (c) 2006, SHIMODA Hiroshi - Copyright (c) 2006, FUJITA Yuji @@ -23,7 +23,7 @@ holders: - the Massachusetts Institute of Technology - AT&T - Henrique de Moraes Holschuh - - Christopher Montgomery , Jean-Marc Valin , Timothy Terriberry , CSIRO , and other contributors + - Christopher Montgomery, Jean-Marc Valin, Timothy Terriberry, CSIRO, and other contributors - James Newton-King - SHIMODA Hiroshi - FUJITA Yuji @@ -40,8 +40,7 @@ holders_summary: count: 1 - value: Academy of Motion Picture Arts and Sciences count: 1 - - value: Christopher Montgomery , Jean-Marc Valin , Timothy Terriberry , CSIRO , and other - contributors + - value: Christopher Montgomery, Jean-Marc Valin, Timothy Terriberry, CSIRO, and other contributors count: 1 - value: Corporation for National Research Initiatives count: 1 diff --git a/tests/cluecode/data/copyrights/partial_detection_mit.txt.yml b/tests/cluecode/data/copyrights/partial_detection_mit.txt.yml index b691edd98e7..3b0b0cc4525 100644 --- a/tests/cluecode/data/copyrights/partial_detection_mit.txt.yml +++ b/tests/cluecode/data/copyrights/partial_detection_mit.txt.yml @@ -6,8 +6,8 @@ copyrights: - Copyright 1991 by the Massachusetts Institute of Technology - Copyright (c) 2001 AT&T - Copyright (c) 2004-2006 by Henrique de Moraes Holschuh - - Copyright 2005-2007 Christopher Montgomery , Jean-Marc Valin , Timothy Terriberry , CSIRO - , and other contributors + - Copyright 2005-2007 Christopher Montgomery, Jean-Marc Valin, Timothy Terriberry, CSIRO, + and other contributors - Copyright (c) 2007 James Newton-King - Copyright (c) 2006, SHIMODA Hiroshi - Copyright (c) 2006, FUJITA Yuji @@ -23,7 +23,7 @@ holders: - the Massachusetts Institute of Technology - AT&T - Henrique de Moraes Holschuh - - Christopher Montgomery , Jean-Marc Valin , Timothy Terriberry , CSIRO , and other contributors + - Christopher Montgomery, Jean-Marc Valin, Timothy Terriberry, CSIRO, and other contributors - James Newton-King - SHIMODA Hiroshi - FUJITA Yuji @@ -40,8 +40,7 @@ holders_summary: count: 1 - value: Academy of Motion Picture Arts and Sciences count: 1 - - value: Christopher Montgomery , Jean-Marc Valin , Timothy Terriberry , CSIRO , and other - contributors + - value: Christopher Montgomery, Jean-Marc Valin, Timothy Terriberry, CSIRO, and other contributors count: 1 - value: Corporation for National Research Initiatives count: 1 diff --git a/tests/cluecode/data/copyrights/seahorse_plugins-seahorse_plugins.copyright.yml b/tests/cluecode/data/copyrights/seahorse_plugins-seahorse_plugins.copyright.yml index 8e45134475f..cdb8d29f586 100644 --- a/tests/cluecode/data/copyrights/seahorse_plugins-seahorse_plugins.copyright.yml +++ b/tests/cluecode/data/copyrights/seahorse_plugins-seahorse_plugins.copyright.yml @@ -31,11 +31,11 @@ copyrights: - Copyright (c) 2007 Ihar Hrachyshka - Copyright (c) 2004, 2005 Miloslav Trmac - Copyright (c) 2003 Peter Mato - - Copyright (c) 2004, 2005 Danijel Studen , Denis Lackovic , Ivan Jankovic + - Copyright (c) 2004, 2005 Danijel Studen, Denis Lackovic, Ivan Jankovic - Copyright (c) 1994 X Consortium - Copyright (c) 2006 Alexander Larsson - Copyright (c) 2000-2003 Ximian Inc. - - Copyright (c) 1995-1997 Peter Mattis , Spencer Kimball and Josh MacDonald + - Copyright (c) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - Copyright (c) 1999, 2000 Robert Bihlmeyer - Copyright (c) Crispin Flowerday - Copyright (c) 2008 Frederic Peters @@ -44,8 +44,7 @@ copyrights: - Copyright (c) 2001-2004 Red Hat, Inc. - Copyright (c) 2004 Scott James Remnant - Copyright (c) 1998-2006 by the - - Copyright (c) 2008 Sebastien Bacher , Andreas Moog , Emilio Pozuelo Monfort and Josselin - Mouette + - Copyright (c) 2008 Sebastien Bacher, Andreas Moog, Emilio Pozuelo Monfort and Josselin Mouette holders: - Stefan Walter - Adam Schreiber @@ -75,11 +74,11 @@ holders: - Ihar Hrachyshka - Miloslav Trmac - Peter Mato - - Danijel Studen , Denis Lackovic , Ivan Jankovic + - Danijel Studen, Denis Lackovic, Ivan Jankovic - X Consortium - Alexander Larsson - Ximian Inc. - - Peter Mattis , Spencer Kimball and Josh MacDonald + - Peter Mattis, Spencer Kimball and Josh MacDonald - Robert Bihlmeyer - Crispin Flowerday - Frederic Peters @@ -87,7 +86,7 @@ holders: - Mario Blattermann - Red Hat, Inc. - Scott James Remnant - - Sebastien Bacher , Andreas Moog , Emilio Pozuelo Monfort and Josselin Mouette + - Sebastien Bacher, Andreas Moog, Emilio Pozuelo Monfort and Josselin Mouette holders_summary: - value: Adam Schreiber count: 1 @@ -105,7 +104,7 @@ holders_summary: count: 1 - value: Daniel Nylander count: 1 - - value: Danijel Studen , Denis Lackovic , Ivan Jankovic + - value: Danijel Studen, Denis Lackovic, Ivan Jankovic count: 1 - value: Dave Camp count: 1 @@ -141,7 +140,7 @@ holders_summary: count: 1 - value: Peter Mato count: 1 - - value: Peter Mattis , Spencer Kimball and Josh MacDonald + - value: Peter Mattis, Spencer Kimball and Josh MacDonald count: 1 - value: Red Hat count: 1 @@ -151,7 +150,7 @@ holders_summary: count: 1 - value: Scott James Remnant count: 1 - - value: Sebastien Bacher , Andreas Moog , Emilio Pozuelo Monfort and Josselin Mouette + - value: Sebastien Bacher, Andreas Moog, Emilio Pozuelo Monfort and Josselin Mouette count: 1 - value: Shaun McCance count: 1 diff --git a/tests/summarycode/data/score/no_license_ambiguity-expected.json b/tests/summarycode/data/score/no_license_ambiguity-expected.json index 7ed3276d13f..0c1809ce79c 100644 --- a/tests/summarycode/data/score/no_license_ambiguity-expected.json +++ b/tests/summarycode/data/score/no_license_ambiguity-expected.json @@ -724,19 +724,24 @@ "percentage_of_license_text": 92.0, "copyrights": [ { - "copyright": "Copyright 2018", + "copyright": "Copyright 2018 Developers of the Rand project", "start_line": 1, "end_line": 1 }, { - "copyright": "Copyright (c) 2014 The Rust Project", + "copyright": "Copyright (c) 2014 The Rust Project Developers", "start_line": 2, "end_line": 2 } ], "holders": [ { - "holder": "The Rust Project", + "holder": "Developers of the Rand project", + "start_line": 1, + "end_line": 1 + }, + { + "holder": "The Rust Project Developers", "start_line": 2, "end_line": 2 } From 6438377704d99a804b376f1a4e8b9995f0db3321 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 7 Jun 2024 15:16:35 +0200 Subject: [PATCH 22/30] Rename README file Signed-off-by: Philippe Ombredanne --- tests/packagedcode/data/rpm_installed/rootfs/README.rst | 2 -- .../data/rpm_installed/rootfs/var-lib-rpm.tar.xz-README.rst | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 tests/packagedcode/data/rpm_installed/rootfs/README.rst create mode 100644 tests/packagedcode/data/rpm_installed/rootfs/var-lib-rpm.tar.xz-README.rst diff --git a/tests/packagedcode/data/rpm_installed/rootfs/README.rst b/tests/packagedcode/data/rpm_installed/rootfs/README.rst deleted file mode 100644 index 56c15a4f3da..00000000000 --- a/tests/packagedcode/data/rpm_installed/rootfs/README.rst +++ /dev/null @@ -1,2 +0,0 @@ -This is the va/lib/rpm directory of a RHEL Docker image. -This is using the BSDDB format \ No newline at end of file diff --git a/tests/packagedcode/data/rpm_installed/rootfs/var-lib-rpm.tar.xz-README.rst b/tests/packagedcode/data/rpm_installed/rootfs/var-lib-rpm.tar.xz-README.rst new file mode 100644 index 00000000000..1ebb612503b --- /dev/null +++ b/tests/packagedcode/data/rpm_installed/rootfs/var-lib-rpm.tar.xz-README.rst @@ -0,0 +1,2 @@ +This is the var/lib/rpm directory of a RHEL Docker image. +This is using the BSDDB format \ No newline at end of file From 1f94c9d10355fc36449c9ddf736a12e54f169c6b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Fri, 7 Jun 2024 23:13:44 +0200 Subject: [PATCH 23/30] Improve copyright detection * Handle better various parens, markup and quotes Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 18 +- src/textcode/markup.py | 19 +- .../data/copyright_fossology/testdata87_raw | 2 +- .../data/copyright_fossology/testdata93_raw | 8 +- .../copyrights/libcdio10-libcdio.label.yml | 2 +- .../data/copyrights/misco2/distributed_3.txt | 1 - .../copyrights/misco2/distributed_3.txt.yml | 11 -- .../copyrights/misco2/its-authors.txt.yml | 8 + .../data/copyrights/misco3/and-others.txt | 4 + .../data/copyrights/misco3/and-others.txt.yml | 12 ++ .../copyrights/misco3/apache-foundation.txt | 1 + .../misco3/apache-foundation.txt.yml | 12 ++ .../misco3/apache-mit-copyright.txt | 5 + .../misco3/apache-mit-copyright.txt.yml | 12 ++ .../data/copyrights/misco3/apple-author.txt | 3 + .../copyrights/misco3/apple-author.txt.yml | 7 + .../misco3/complex-multiline-copyright.txt | 8 + .../complex-multiline-copyright.txt.yml | 18 ++ .../misco3/copyright-republic-ireland.txt | 1 + .../misco3/copyright-republic-ireland.txt.yml | 5 + .../misco3/correct-copyright-bsd.txt | 1 + .../misco3/correct-copyright-bsd.txt.yml | 12 ++ .../misco3/correct-copyright-libidn.txt | 2 + .../misco3/correct-copyright-libidn.txt.yml | 16 ++ .../misco3/correct-copyright-minpack.txt | 1 + .../misco3/correct-copyright-minpack.txt.yml | 12 ++ .../misco3/distributed-copyright.txt | 7 + .../misco3/distributed-copyright.txt.yml | 16 ++ .../intractable-copyright-in-LICENSE.txt | 30 +++ .../intractable-copyright-in-LICENSE.txt.yml | 17 ++ .../intractable-copyright-in-LICENSE2.txt | 31 +++ .../intractable-copyright-in-LICENSE2.txt.yml | 22 +++ .../copyrights/misco3/javadoc-author.java | 2 + .../copyrights/misco3/javadoc-author.java.yml | 7 + .../data/copyrights/misco3/javadoc-author.txt | 8 + .../copyrights/misco3/javadoc-author.txt.yml | 7 + .../misco3/misc-copyrights-tests.txt | 7 + .../misco3/misc-copyrights-tests.txt.yml | 20 ++ .../copyrights/misco3/not-real-copyrights | 187 ++++++++++++++++++ .../copyrights/misco3/not-real-copyrights.yml | 5 + .../copyrights/misco3/parens-with-spaces.txt | 3 + .../misco3/parens-with-spaces.txt.yml | 12 ++ .../data/copyrights/misco3/rachana.copyright | 7 + .../copyrights/misco3/rachana.copyright.yml | 15 ++ .../data/copyrights/misco3/rachana2.copyright | 7 + .../copyrights/misco3/rachana2.copyright.yml | 15 ++ .../data/copyrights/misco3/rice-uni.txt | 1 + .../data/copyrights/misco3/rice-uni.txt.yml | 12 ++ .../copyrights/misco3/videola-with-parens.txt | 2 + .../misco3/videola-with-parens.txt.yml | 12 ++ .../data/generated/copyright_33.txt.yml | 2 +- .../markdown.php.yml | 6 +- .../smartypants.php.yml | 4 +- .../data/ics/zlib-contrib-minizip/ioapi.c.yml | 5 +- .../ics/zlib-contrib-minizip/miniunz.c.yml | 5 +- .../data/ics/zlib-contrib-minizip/unzip.c.yml | 4 +- .../data/ics/zlib-contrib-minizip/zip.c.yml | 5 +- 57 files changed, 647 insertions(+), 37 deletions(-) delete mode 100644 tests/cluecode/data/copyrights/misco2/distributed_3.txt delete mode 100644 tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/and-others.txt create mode 100644 tests/cluecode/data/copyrights/misco3/and-others.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/apache-foundation.txt create mode 100644 tests/cluecode/data/copyrights/misco3/apache-foundation.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt create mode 100644 tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/apple-author.txt create mode 100644 tests/cluecode/data/copyrights/misco3/apple-author.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt create mode 100644 tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt create mode 100644 tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt create mode 100644 tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt create mode 100644 tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt create mode 100644 tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/distributed-copyright.txt create mode 100644 tests/cluecode/data/copyrights/misco3/distributed-copyright.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt create mode 100644 tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt create mode 100644 tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/javadoc-author.java create mode 100644 tests/cluecode/data/copyrights/misco3/javadoc-author.java.yml create mode 100644 tests/cluecode/data/copyrights/misco3/javadoc-author.txt create mode 100644 tests/cluecode/data/copyrights/misco3/javadoc-author.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt create mode 100644 tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/not-real-copyrights create mode 100644 tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml create mode 100644 tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt create mode 100644 tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/rachana.copyright create mode 100644 tests/cluecode/data/copyrights/misco3/rachana.copyright.yml create mode 100644 tests/cluecode/data/copyrights/misco3/rachana2.copyright create mode 100644 tests/cluecode/data/copyrights/misco3/rachana2.copyright.yml create mode 100644 tests/cluecode/data/copyrights/misco3/rice-uni.txt create mode 100644 tests/cluecode/data/copyrights/misco3/rice-uni.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco3/videola-with-parens.txt create mode 100644 tests/cluecode/data/copyrights/misco3/videola-with-parens.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index b646ec4565a..663864a6d28 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2389,7 +2389,7 @@ def build_detection_from_node( NAME-EMAIL: { } #530 # Project Mayo. - NAME-YEAR: { + ?} #535 + NAME-YEAR: {? + ? ?} #535 NAME-YEAR: { + } #540 @@ -2404,7 +2404,6 @@ def build_detection_from_node( # Copyright 2018, OpenCensus Authors COPYRIGHT: {+ } #1579991 - NAME-YEAR: { + ?} #5612 #Academy of Motion Picture Arts and Sciences @@ -2418,6 +2417,8 @@ def build_detection_from_node( NAME-YEAR: { + ?} #570 + URL: { } #5700 + #also accept trailing email and URLs NAME-YEAR: { ??} #5701 NAME-YEAR: {+} #5702 @@ -2470,7 +2471,6 @@ def build_detection_from_node( # this is catching a wide net by treating any bare URL as a company COMPANY: {? } #830 - COMPANY: { } #840 # the Software and Component Technologies group of Trimble Navigation, Ltd. @@ -2649,6 +2649,9 @@ def build_detection_from_node( # Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. COPYRIGHT: {+ + *} #157999 + # portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. + COPYRIGHT: { } #157998 + COPYRIGHT: {+ + ?} #1590 # // (c) (C) → © @@ -2737,6 +2740,9 @@ def build_detection_from_node( # (c) Copyright 1985-1999 SOME TECHNOLOGY SYSTEMS COPYRIGHT2: { ? ?} #2271 + # Minpack Copyright Notice (1999) University of Chicago + COPYRIGHT: { } #2273.1 + # NAME-COPY is a name with a trailing copyright # Daisy (c) 1998 NAME-COPY: { } #2272 @@ -3081,6 +3087,12 @@ def build_detection_from_node( # Copyright (c) 2014 The Rust Project Developers COPYRIGHT: { } #83020 + # copyright its authors + COPYRIGHT: { } #83030 + + # Copyright: 2004-2007 by Internet Systems Consortium, Inc. ("ISC") + # 1995-2003 by Internet Software Consortium + COPYRIGHT: { } #1615 ####################################### # Copyright is held by .... diff --git a/src/textcode/markup.py b/src/textcode/markup.py index 8b403e234c3..05abd25eb4d 100644 --- a/src/textcode/markup.py +++ b/src/textcode/markup.py @@ -108,7 +108,22 @@ def demarkup(location): yield demarkup_text(line) -get_tags_and_entities = re.compile(r'(|\s)?|&[^\s&]+;|href|[\'"]?\/\>)', re.IGNORECASE).split +get_tags_and_entities = re.compile( + r'(' + r'' + r'|' + r'\s)?' + r'|' + r'&[^\s&]+;' + r'|' + r'href' + r'|' + '[\'"]?\/\>' + r'|' + r'/>' + r')', + re.IGNORECASE, +).split def demarkup_text(text): @@ -136,7 +151,7 @@ def demarkup_text(text): cleaned_append = cleaned.append for token in tags_and_ents: tlow = token.lower() - if tlow.startswith(('<', '/>', '&', 'href',)) and not any(k in tlow for k in kept_tags): + if tlow.startswith(('<', '/>', '"/>', "'/>", '&', 'href',)) and not any(k in tlow for k in kept_tags): cleaned_append(' ') else: cleaned_append(token) diff --git a/tests/cluecode/data/copyright_fossology/testdata87_raw b/tests/cluecode/data/copyright_fossology/testdata87_raw index bfe45a10d2c..98b8fab91f5 100644 --- a/tests/cluecode/data/copyright_fossology/testdata87_raw +++ b/tests/cluecode/data/copyright_fossology/testdata87_raw @@ -6,7 +6,7 @@ It was downloaded from http://ftp.isc.org/isc/dhcp/ Upstream Author: Internet Systems Consortium (ISC) Copyright 2004-2007 by Internet Systems Consortium, Inc. ("ISC") - 1995-2003 by Internet Software Consortium + 1995-2003 by Internet Software Consortium License: diff --git a/tests/cluecode/data/copyright_fossology/testdata93_raw b/tests/cluecode/data/copyright_fossology/testdata93_raw index 4b561185aa2..c7087355f09 100644 --- a/tests/cluecode/data/copyright_fossology/testdata93_raw +++ b/tests/cluecode/data/copyright_fossology/testdata93_raw @@ -33,10 +33,10 @@ Copyright: CTOCWidget.js: Copyright (c) 2003 The Netscape Corporation. xbCollapsibleLists.js: - Copyright (c) 1997 Michael Bostock (Netscape Communications). - Copyright (c) 2001 Bob Clary (Netscape Communications). - Copyright (c) 2001 Seth Dillingham (Macrobyte Resources). - Copyright (c) 2002 Mark Filanowicz (Amdahl IT Services). + Copyright (c) 1997 Michael Bostock (Netscape Communications). + Copyright (c) 2001 Bob Clary (Netscape Communications). + Copyright (c) 2001 Seth Dillingham (Macrobyte Resources). + Copyright (c) 2002 Mark Filanowicz (Amdahl IT Services). Upstream Author: diff --git a/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml b/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml index dd75e64e8a1..e52246af6a5 100644 --- a/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml +++ b/tests/cluecode/data/copyrights/libcdio10-libcdio.label.yml @@ -20,7 +20,7 @@ copyrights: - Copyright (c) 1985, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - Copyright (c) 2003 Matthias Drochner - - Copyright (c) 1998-2001 VideoLAN ( Johan Bilien and Gildas Bazin ) + - Copyright (c) 1998-2001 VideoLAN Johan Bilien and Gildas Bazin - Copyright (c) 1992, 1993 Eric Youngdale - Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 Rocky Bernstein and Herbert Valerio Riedel holders: diff --git a/tests/cluecode/data/copyrights/misco2/distributed_3.txt b/tests/cluecode/data/copyrights/misco2/distributed_3.txt deleted file mode 100644 index 56fa6e25e00..00000000000 --- a/tests/cluecode/data/copyrights/misco2/distributed_3.txt +++ /dev/null @@ -1 +0,0 @@ -(C) Distributed Management Task Force diff --git a/tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml b/tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml deleted file mode 100644 index 2c05cd0225d..00000000000 --- a/tests/cluecode/data/copyrights/misco2/distributed_3.txt.yml +++ /dev/null @@ -1,11 +0,0 @@ -what: - - copyrights - - holders - - holders_summary -copyrights: - - (c) Distributed Management Task Force -holders: - - Distributed Management Task Force -holders_summary: - - value: Distributed Management Task Force - count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml b/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml index d2d767fb096..42392c2268b 100644 --- a/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml @@ -3,3 +3,11 @@ what: - holders - holders_summary - authors +copyrights: + - copyright its authors +holders: + - its authors +holders_summary: + - value: its authors + count: 1 + diff --git a/tests/cluecode/data/copyrights/misco3/and-others.txt b/tests/cluecode/data/copyrights/misco3/and-others.txt new file mode 100644 index 00000000000..917501f68d7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/and-others.txt @@ -0,0 +1,4 @@ + Copyright © 1998-2009 Bill Spitzak + (spitzak@users.sourceforge.net ) and others, including: + + diff --git a/tests/cluecode/data/copyrights/misco3/and-others.txt.yml b/tests/cluecode/data/copyrights/misco3/and-others.txt.yml new file mode 100644 index 00000000000..f54c19f86a2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/and-others.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 1998-2009 Bill Spitzak (spitzak@users.sourceforge.net ) and others +holders: + - Bill Spitzak and others +holders_summary: + - value: Bill Spitzak and others + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/apache-foundation.txt b/tests/cluecode/data/copyrights/misco3/apache-foundation.txt new file mode 100644 index 00000000000..7785174ddc3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/apache-foundation.txt @@ -0,0 +1 @@ +

Copyright 2009 The Apache Software Foundation.
diff --git a/tests/cluecode/data/copyrights/misco3/apache-foundation.txt.yml b/tests/cluecode/data/copyrights/misco3/apache-foundation.txt.yml new file mode 100644 index 00000000000..45f36e38d69 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/apache-foundation.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright 2009 The Apache Software Foundation +holders: + - The Apache Software Foundation +holders_summary: + - value: The Apache Software Foundation + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt b/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt new file mode 100644 index 00000000000..e59e9cfba75 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt @@ -0,0 +1,5 @@ +This project is copyright its authors and licensed under either of + + Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) + MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option. + diff --git a/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml b/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml new file mode 100644 index 00000000000..72741dc978d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - copyright its authors +holders: + - its authors +holders_summary: + - value: its authors + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/apple-author.txt b/tests/cluecode/data/copyrights/misco3/apple-author.txt new file mode 100644 index 00000000000..ad41dfce688 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/apple-author.txt @@ -0,0 +1,3 @@ + +'cannot be modified' by Apple's SF Pro +Symbols Viewer v2.0.0 diff --git a/tests/cluecode/data/copyrights/misco3/apple-author.txt.yml b/tests/cluecode/data/copyrights/misco3/apple-author.txt.yml new file mode 100644 index 00000000000..ee0f38824f2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/apple-author.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - holders_summary + - authors +authors: + - Apple's SF Pro diff --git a/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt b/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt new file mode 100644 index 00000000000..078a1f9d989 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt @@ -0,0 +1,8 @@ +Copyright (c) 2016-2020 Alexey Svetliakov , +snerks , Krzysztof Cebula +, Vitaliy Polyanskiy , +James Lismore , Stack Builders , +Esteban Ibarra , Dominic Lee +, Dave Vedder , +Alec Flett and potentially other +DefinitelyTyped contributors. diff --git a/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml b/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml new file mode 100644 index 00000000000..bfb633e3723 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2016-2020 Alexey Svetliakov , snerks + , Krzysztof Cebula , Vitaliy Polyanskiy + , James Lismore , Stack Builders + , Esteban Ibarra , Dominic Lee + , Dave Vedder , Alec Flett +holders: + - Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore , Stack + Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett +holders_summary: + - value: Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore + , Stack Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt b/tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt new file mode 100644 index 00000000000..8fe440ff413 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt @@ -0,0 +1 @@ +or Kana; or (c) the Republic of Ireland, if a license to the Software diff --git a/tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt.yml b/tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt.yml new file mode 100644 index 00000000000..d2d767fb096 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/copyright-republic-ireland.txt.yml @@ -0,0 +1,5 @@ +what: + - copyrights + - holders + - holders_summary + - authors diff --git a/tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt b/tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt new file mode 100644 index 00000000000..d10d3e34a28 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt @@ -0,0 +1 @@ +The copyright of UC Berkeley's Berkeley Software Distribution ("BSD") \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt.yml b/tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt.yml new file mode 100644 index 00000000000..93e09487c41 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/correct-copyright-bsd.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - copyright of UC Berkeley's Berkeley Software +holders: + - UC Berkeley's Berkeley Software +holders_summary: + - value: UC Berkeley's Berkeley Software + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt b/tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt new file mode 100644 index 00000000000..12f2d78c6d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt @@ -0,0 +1,2 @@ +* The libidn code is copyright Simon Josefsson, with portions copyright + The Internet Society, Tom Tromey and Red Hat, Inc.: diff --git a/tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt.yml b/tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt.yml new file mode 100644 index 00000000000..e90d25f055f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/correct-copyright-libidn.txt.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - copyright Simon Josefsson + - portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. +holders: + - Simon Josefsson + - The Internet Society, Tom Tromey and Red Hat, Inc. +holders_summary: + - value: Simon Josefsson + count: 1 + - value: The Internet Society, Tom Tromey and Red Hat, Inc. + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt b/tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt new file mode 100644 index 00000000000..e7f2dc3fc95 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt @@ -0,0 +1 @@ + Minpack Copyright Notice (1999) University of Chicago diff --git a/tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt.yml b/tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt.yml new file mode 100644 index 00000000000..a2276f8f22e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/correct-copyright-minpack.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright Notice (1999) University of Chicago +holders: + - University of Chicago +holders_summary: + - value: University of Chicago + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/distributed-copyright.txt b/tests/cluecode/data/copyrights/misco3/distributed-copyright.txt new file mode 100644 index 00000000000..87c1f201c87 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/distributed-copyright.txt @@ -0,0 +1,7 @@ + * Copyright (C) 2010 GSyC/LibreSoft, Universidad Rey Juan Carlos. + + + + + +Copyright (c) Distributed Management Task Force diff --git a/tests/cluecode/data/copyrights/misco3/distributed-copyright.txt.yml b/tests/cluecode/data/copyrights/misco3/distributed-copyright.txt.yml new file mode 100644 index 00000000000..c2df105837f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/distributed-copyright.txt.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2010 GSyC/LibreSoft, Universidad Rey Juan Carlos + - Copyright (c) Distributed Management Task Force +holders: + - GSyC/LibreSoft, Universidad Rey Juan Carlos + - Distributed Management Task Force +holders_summary: + - value: Distributed Management Task Force + count: 1 + - value: GSyC/LibreSoft, Universidad Rey Juan Carlos + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt new file mode 100644 index 00000000000..4d33f1aba85 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt @@ -0,0 +1,30 @@ +The MIT License (MIT) + +Copyright (c) 2015-2020 Formidable Labs. + +Copyright (c) 2016-2020 Alexey Svetliakov , +snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore +, Stack Builders , Esteban Ibarra , Dominic Lee +, Dave Vedder , Alec Flett and potentially other +DefinitelyTyped contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml new file mode 100644 index 00000000000..53d35a45ac5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2015-2020 Formidable Labs + - Copyright (c) 2016-2020 Alexey Svetliakov , snerks + , Krzysztof Cebula https://github.com +holders: + - Formidable Labs + - Alexey Svetliakov , snerks , Krzysztof Cebula +holders_summary: + - value: Alexey Svetliakov , snerks , Krzysztof Cebula + count: 1 + - value: Formidable Labs + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt new file mode 100644 index 00000000000..57aeb87a681 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt @@ -0,0 +1,31 @@ +# here we fixed the text to restore URLs +The MIT License (MIT) + +Copyright (c) 2015-2020 Formidable Labs. + +Copyright (c) 2016-2020 Alexey Svetliakov , +snerks , Krzysztof Cebula , +Vitaliy Polyanskiy , James Lismore +, Stack Builders , +Esteban Ibarra , Dominic Lee +, Dave Vedder , +Alec Flett and potentially other +DefinitelyTyped contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml new file mode 100644 index 00000000000..481ca22b771 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2015-2020 Formidable Labs + - Copyright (c) 2016-2020 Alexey Svetliakov , snerks + , Krzysztof Cebula , Vitaliy Polyanskiy + , James Lismore , Stack Builders + , Esteban Ibarra , Dominic Lee + , Dave Vedder , Alec Flett +holders: + - Formidable Labs + - Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore , Stack + Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett +holders_summary: + - value: Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore + , Stack Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett + count: 1 + - value: Formidable Labs + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/javadoc-author.java b/tests/cluecode/data/copyrights/misco3/javadoc-author.java new file mode 100644 index 00000000000..27bb72cc29f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/javadoc-author.java @@ -0,0 +1,2 @@ + * @author Stephane Hillion + diff --git a/tests/cluecode/data/copyrights/misco3/javadoc-author.java.yml b/tests/cluecode/data/copyrights/misco3/javadoc-author.java.yml new file mode 100644 index 00000000000..5ff17d6c03b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/javadoc-author.java.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - holders_summary + - authors +authors: + - stephane@hillion.org Stephane Hillion diff --git a/tests/cluecode/data/copyrights/misco3/javadoc-author.txt b/tests/cluecode/data/copyrights/misco3/javadoc-author.txt new file mode 100644 index 00000000000..9875908914c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/javadoc-author.txt @@ -0,0 +1,8 @@ + * This interface represents the objects which provide support for + * shorthand properties. + * + * @author Stephane Hillion + * @version $Id: ShorthandManager.java 1733416 2016-03-03 07:07:13Z gadams $ + */ +public interface ShorthandManager { + diff --git a/tests/cluecode/data/copyrights/misco3/javadoc-author.txt.yml b/tests/cluecode/data/copyrights/misco3/javadoc-author.txt.yml new file mode 100644 index 00000000000..5ff17d6c03b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/javadoc-author.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - holders_summary + - authors +authors: + - stephane@hillion.org Stephane Hillion diff --git a/tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt b/tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt new file mode 100644 index 00000000000..592d6d8267a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt @@ -0,0 +1,7 @@ +Copyright (c) AliasDotCom +Copyright (c) AllThingsTalk + + +Copyright (c) 2014 The Rust Project Developers + + diff --git a/tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt.yml b/tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt.yml new file mode 100644 index 00000000000..5bf2326ef5e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/misc-copyrights-tests.txt.yml @@ -0,0 +1,20 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) AliasDotCom + - Copyright (c) AllThingsTalk + - Copyright (c) 2014 The Rust Project Developers +holders: + - AliasDotCom + - AllThingsTalk + - The Rust Project Developers +holders_summary: + - value: AliasDotCom + count: 1 + - value: AllThingsTalk + count: 1 + - value: The Rust Project Developers + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/not-real-copyrights b/tests/cluecode/data/copyrights/misco3/not-real-copyrights new file mode 100644 index 00000000000..9a4257f6938 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/not-real-copyrights @@ -0,0 +1,187 @@ +(c) grant Mentor Graphics the rights + + + + + + + +see copyright notice in LICENSE-tests + + + + + + + + see copyright notice in LICENSE-assets + + + + + + + + the above copyright notice of Xerox Corporation, + + (Copyright ) GNU General Public Licence 3 + + + + + + + +(Copyright ) GNU General Public License 3 + + + + + + + + - Copyright notice GNU General + + + + + + + + - (c) If Exhibit B + + + + + + + +(c) "CockroachDB Enterprise Edition" shall mean + + + + + + + +license (copyright owned by the author or another company other + + + + + + + +Your customers. (c) Custom Nessus Plugin Development and Distribution. Tenable + + + + + + + +at the U.S. Copyright website or at www.chillingeffects.org + + + + + + + +as Hangul or Kana; or (c) the Republic of Ireland, if a + + + + + + + +days prior written notice, Couchbase Inc + + + + + + + +(c) No Re-Creating Google Products or Features. Customer + + + + + + + +(c) the Google Maps/Google Earth Additional Terms of Service + + + + + + + +2. Copyright +The LavanTech Software and the accompanying + + + + + + +rights +this copyright notice (directly copied from +X Consortium licence): + + + + + + + +Copyright " {YEAR} United States Government as represented by + + + + + + + +Copyright " {YEAR} United States Government as represented by . No copyright is + + + + + + + +11. Copyright Directives +The Initial Developer retains all rights, title and + + + + + + + +Quirksmode Copyright Notice +http://www.quirksmode.org/about/copyright.html + + + + + + +f the Copyright Directive 2001/29/EC + + + + + + + +EU Copyright Directive. 2001/29/EC + + + + + diff --git a/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml b/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml new file mode 100644 index 00000000000..d2d767fb096 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml @@ -0,0 +1,5 @@ +what: + - copyrights + - holders + - holders_summary + - authors diff --git a/tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt b/tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt new file mode 100644 index 00000000000..e841ce2ec6b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt @@ -0,0 +1,3 @@ + +Copyright (1997 3Dfx Interactive, Inc.) +All Rights Reserved diff --git a/tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt.yml b/tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt.yml new file mode 100644 index 00000000000..edbba5e7144 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/parens-with-spaces.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (1997 3Dfx Interactive, Inc.) +holders: + - 3Dfx Interactive, Inc. +holders_summary: + - value: 3Dfx Interactive, Inc. + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/rachana.copyright b/tests/cluecode/data/copyrights/misco3/rachana.copyright new file mode 100644 index 00000000000..9ba377492fb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/rachana.copyright @@ -0,0 +1,7 @@ + + (Rachana_04.ttf) + Copyright (C) 2005 Rachana Akshara Vedi + (Chitrajakumar R, Hussain KH, Rajeev Sebastian, + Gangadharan N, Vijayakumaran Nair, Subash Kuraiakose) + + diff --git a/tests/cluecode/data/copyrights/misco3/rachana.copyright.yml b/tests/cluecode/data/copyrights/misco3/rachana.copyright.yml new file mode 100644 index 00000000000..0095b5992a5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/rachana.copyright.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2005 Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, + Gangadharan N, Vijayakumaran Nair, Subash Kuraiakose) +holders: + - Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, Gangadharan N, Vijayakumaran + Nair, Subash Kuraiakose) +holders_summary: + - value: Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, Gangadharan + N, Vijayakumaran Nair, Subash Kuraiakose) + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/rachana2.copyright b/tests/cluecode/data/copyrights/misco3/rachana2.copyright new file mode 100644 index 00000000000..128829560b9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/rachana2.copyright @@ -0,0 +1,7 @@ + + (Rachana_04.ttf) + Copyright (C) 2005 Rachana Akshara Vedi + (Chitrajakumar R, Hussain KH, Rajeev Sebastian, + Gangadharan N, Vijayakumaran Nair, Subash Kuraiakose) + + diff --git a/tests/cluecode/data/copyrights/misco3/rachana2.copyright.yml b/tests/cluecode/data/copyrights/misco3/rachana2.copyright.yml new file mode 100644 index 00000000000..0095b5992a5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/rachana2.copyright.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2005 Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, + Gangadharan N, Vijayakumaran Nair, Subash Kuraiakose) +holders: + - Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, Gangadharan N, Vijayakumaran + Nair, Subash Kuraiakose) +holders_summary: + - value: Rachana Akshara Vedi (Chitrajakumar R, Hussain KH, Rajeev Sebastian, Gangadharan + N, Vijayakumaran Nair, Subash Kuraiakose) + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/rice-uni.txt b/tests/cluecode/data/copyrights/misco3/rice-uni.txt new file mode 100644 index 00000000000..ca56c77a117 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/rice-uni.txt @@ -0,0 +1 @@ + Copyright (©) 2001, Rice University diff --git a/tests/cluecode/data/copyrights/misco3/rice-uni.txt.yml b/tests/cluecode/data/copyrights/misco3/rice-uni.txt.yml new file mode 100644 index 00000000000..01166c4dddc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/rice-uni.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2001, Rice University +holders: + - Rice University +holders_summary: + - value: Rice University + count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/videola-with-parens.txt b/tests/cluecode/data/copyrights/misco3/videola-with-parens.txt new file mode 100644 index 00000000000..3d972cf6738 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/videola-with-parens.txt @@ -0,0 +1,2 @@ + Copyright (C) 1998-2001 VideoLAN (Johan Bilien and Gildas Bazin ) + diff --git a/tests/cluecode/data/copyrights/misco3/videola-with-parens.txt.yml b/tests/cluecode/data/copyrights/misco3/videola-with-parens.txt.yml new file mode 100644 index 00000000000..d7705cf3e45 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco3/videola-with-parens.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 1998-2001 VideoLAN Johan Bilien and Gildas Bazin +holders: + - VideoLAN Johan Bilien and Gildas Bazin +holders_summary: + - value: VideoLAN Johan Bilien and Gildas Bazin + count: 1 diff --git a/tests/cluecode/data/generated/copyright_33.txt.yml b/tests/cluecode/data/generated/copyright_33.txt.yml index 63ee3f8be99..4410dc3cd16 100644 --- a/tests/cluecode/data/generated/copyright_33.txt.yml +++ b/tests/cluecode/data/generated/copyright_33.txt.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright 2019 authors: - - Author Pine + - Pine expected_failures: - holders - copyrights diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml index 752adf32491..91ec24e7471 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml @@ -3,10 +3,10 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2004-2008 Michel Fortin http //www.michelf.com/projects/php-markdown + - Copyright (c) 2004-2008 Michel Fortin - Copyright (c) 2004-2006 John Gruber - - Copyright (c) 2004-2008 Michel Fortin - - Copyright (c) 2003-2006 John Gruber + - Copyright (c) 2004-2008 Michel Fortin http://www.michelf.com + - Copyright (c) 2003-2006 John Gruber http://daringfireball.net holders: - Michel Fortin - John Gruber diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml index 11ac9206af4..6dc20b6be7d 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml @@ -5,8 +5,8 @@ what: copyrights: - Copyright (c) 2003-2004 John Gruber - Copyright (c) 2004-2005 Michel Fortin - - Copyright (c) 2003 John Gruber - - Copyright (c) 2004-2005 Michel Fortin + - Copyright (c) 2003 John Gruber http://daringfireball.net + - Copyright (c) 2004-2005 Michel Fortin holders: - John Gruber - Michel Fortin diff --git a/tests/cluecode/data/ics/zlib-contrib-minizip/ioapi.c.yml b/tests/cluecode/data/ics/zlib-contrib-minizip/ioapi.c.yml index f0d300c4c95..e5db9f9e590 100644 --- a/tests/cluecode/data/ics/zlib-contrib-minizip/ioapi.c.yml +++ b/tests/cluecode/data/ics/zlib-contrib-minizip/ioapi.c.yml @@ -3,8 +3,9 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2010 Gilles Vollant (minizip) http://www.winimage.com/zLibDll/minizip.html - - Copyright (c) 2009-2010 Mathias Svensson http://result42.com + - Copyright (c) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html + ) + - Copyright (c) 2009-2010 Mathias Svensson ( http://result42.com ) holders: - Gilles Vollant - Mathias Svensson diff --git a/tests/cluecode/data/ics/zlib-contrib-minizip/miniunz.c.yml b/tests/cluecode/data/ics/zlib-contrib-minizip/miniunz.c.yml index 412d7f3b67c..16b11067462 100644 --- a/tests/cluecode/data/ics/zlib-contrib-minizip/miniunz.c.yml +++ b/tests/cluecode/data/ics/zlib-contrib-minizip/miniunz.c.yml @@ -3,9 +3,10 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2010 Gilles Vollant (minizip) http://www.winimage.com/zLibDll/minizip.html + - Copyright (c) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html + ) - Copyright (c) 2007-2008 Even Rouault - - Copyright (c) 2009-2010 Mathias Svensson http://result42.com + - Copyright (c) 2009-2010 Mathias Svensson ( http://result42.com ) holders: - Gilles Vollant - Even Rouault diff --git a/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml b/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml index 30cb941112e..0c6023f688c 100644 --- a/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml +++ b/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml @@ -3,9 +3,9 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2010 Gilles Vollant (minizip) http://www.winimage.com/zLibDll/minizip.html + - Copyright (c) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (c) 2007-2008 Even Rouault - - Copyright (c) 2009-2010 Mathias Svensson http://result42.com + - Copyright (c) 2009-2010 Mathias Svensson ( http://result42.com ) - Copyright (c) 1990-2000 Info-ZIP. - Copyright (c) 2007-2008 Even Rouault - Copyright (c) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson diff --git a/tests/cluecode/data/ics/zlib-contrib-minizip/zip.c.yml b/tests/cluecode/data/ics/zlib-contrib-minizip/zip.c.yml index c0916a35530..4e28f0bf3a3 100644 --- a/tests/cluecode/data/ics/zlib-contrib-minizip/zip.c.yml +++ b/tests/cluecode/data/ics/zlib-contrib-minizip/zip.c.yml @@ -3,8 +3,9 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2010 Gilles Vollant (minizip) http://www.winimage.com/zLibDll/minizip.html - - Copyright (c) 2009-2010 Mathias Svensson http://result42.com + - Copyright (c) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html + ) + - Copyright (c) 2009-2010 Mathias Svensson ( http://result42.com ) - Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll holders: - Gilles Vollant From 3bccb318eec1ab24c4d719b7d0dea80d7b79f57d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 22 Jun 2024 00:21:57 +0200 Subject: [PATCH 24/30] Improve copyright detection Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 138 +++++++++++++----- src/licensedcode/data/licenses/cups.LICENSE | 3 +- .../data/licenses/ms-directx-sdk-eula.LICENSE | 4 +- src/licensedcode/data/licenses/mtll.LICENSE | 6 +- .../data/licenses/nero-eula.LICENSE | 3 +- .../data/licenses/occt-pl.LICENSE | 4 +- .../qt-commercial-agreement-4.4.1.LICENSE | 3 +- src/licensedcode/data/licenses/srgb.LICENSE | 4 +- .../data/licenses/wifi-alliance.LICENSE | 4 +- src/licensedcode/data/rules/bsd-new_951.RULE | 6 +- .../data/rules/commercial-license_38.RULE | 4 +- .../cpal-1.0_or_commercial-license_1.RULE | 4 +- src/licensedcode/data/rules/gpl-2.0_630.RULE | 4 +- .../rules/mpl-1.1_or_gpl-2.0-plus_10.RULE | 4 +- .../rules/mpl-1.1_or_gpl-2.0-plus_11.RULE | 4 +- .../rules/mpl-1.1_or_gpl-2.0-plus_12.RULE | 4 +- .../rules/mpl-1.1_or_gpl-2.0-plus_13.RULE | 4 +- .../rules/mpl-1.1_or_gpl-2.0-plus_14.RULE | 6 +- .../rules/mpl-1.1_or_gpl-2.0-plus_15.RULE | 6 +- .../rules/mpl-1.1_or_gpl-2.0-plus_16.RULE | 6 +- .../rules/mpl-1.1_or_gpl-2.0-plus_17.RULE | 6 +- .../data/rules/mpl-1.1_or_gpl-2.0-plus_6.RULE | 4 +- .../data/rules/mpl-1.1_or_gpl-2.0-plus_8.RULE | 4 +- .../data/rules/mpl-1.1_or_gpl-2.0-plus_9.RULE | 6 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_12.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_14.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_18.RULE | 6 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_19.RULE | 6 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_20.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_24.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_25.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_26.RULE | 6 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_28.RULE | 6 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_31.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_32.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_33.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_35.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_37.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_38.RULE | 6 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_39.RULE | 4 +- ...1_or_gpl-2.0-plus_or_lgpl-2.1-plus_40.RULE | 6 +- ....1_or_gpl-2.0-plus_or_lgpl-2.1-plus_9.RULE | 6 +- .../rules/mpl-1.1_or_lgpl-2.1-plus_10.RULE | 4 +- .../rules/mpl-1.1_or_lgpl-2.1-plus_9.RULE | 4 +- ...1.1_or_lgpl-2.1-plus_or_apache-2.0_10.RULE | 4 +- ...1.1_or_lgpl-2.1-plus_or_apache-2.0_11.RULE | 4 +- ...1.1_or_lgpl-2.1-plus_or_apache-2.0_12.RULE | 4 +- ...-1.1_or_lgpl-2.1-plus_or_apache-2.0_4.RULE | 4 +- ...-1.1_or_lgpl-2.1-plus_or_apache-2.0_7.RULE | 4 +- ...-1.1_or_lgpl-2.1-plus_or_apache-2.0_8.RULE | 4 +- ...-1.1_or_lgpl-2.1-plus_or_apache-2.0_9.RULE | 4 +- .../data/rules/proprietary-license_637.RULE | 4 +- .../data/rules/public-domain_or_mit_7.RULE | 6 +- .../data/rules/wifi-alliance.RULE | 4 +- src/licensedcode/data/rules/zpl-1.1_2.RULE | 3 +- .../data/copyright_fossology/testdata22_raw | 2 +- .../data/copyright_fossology/testdata87_raw | 4 +- .../copyrights/dual_mpl_gpl-Dual MPL GPL.yml | 2 +- ...owser_data-epiphany_browser_data.label.yml | 2 +- .../copyrights/misco4/initial-dev-again.txt | 2 + .../misco4/initial-dev-again.txt.yml | 12 ++ .../data/copyrights/misco4/nasa-copyright | 4 + .../data/copyrights/misco4/nasa-copyright.yml | 15 ++ .../misco4/portions-initial-developer.txt | 3 + .../misco4/portions-initial-developer.txt.yml | 12 ++ .../data/generated/copyright_33.txt.yml | 5 - .../LICENSE.yml | 2 +- .../prtime.cc.yml | 2 +- .../download_extensions.cc.yml | 2 +- .../firefox_profile_lock.cc.yml | 2 +- .../firefox_profile_lock_posix.cc.yml | 2 +- .../firefox_profile_lock_win.cc.yml | 2 +- .../mork_reader.cc.yml | 2 +- .../nss_decryptor.cc.yml | 2 +- .../nss_decryptor_mac.h.yml | 2 +- .../nss_decryptor_win.h.yml | 2 +- .../about_credits.html.yml | 12 +- .../jquery-1.4.2.min.js.yml | 2 +- .../blapi.h.yml | 2 +- .../sha256.h.yml | 2 +- .../chromium-googleurl-src/url_parse.cc.yml | 2 +- .../ics/chromium-googleurl/LICENSE.txt.yml | 2 +- .../chromium-net-base/cookie_monster.cc.yml | 2 +- .../effective_tld_names.dat.yml | 2 +- .../http_chunked_decoder.cc.yml | 2 +- .../ssl_client_socket_nss.cc.yml | 2 +- .../README.txt.yml | 2 +- .../multipart_response_delegate.h.yml | 2 +- .../webkit_strings.grd.yml | 2 +- .../markdown.php.yml | 2 - .../smartypants.php.yml | 2 - tests/cluecode/data/ics/speex/NOTICE.yml | 3 + tests/licensedcode/test_detection_validate.py | 9 +- .../libc-bin/copyright-detailed.expected.yml | 2 +- .../doc/libc6/copyright-detailed.expected.yml | 2 +- .../data/markup/java.jsp-expected.json | 70 ++++----- tests/textcode/test_markup.py | 4 +- 97 files changed, 302 insertions(+), 291 deletions(-) create mode 100644 tests/cluecode/data/copyrights/misco4/initial-dev-again.txt create mode 100644 tests/cluecode/data/copyrights/misco4/initial-dev-again.txt.yml create mode 100644 tests/cluecode/data/copyrights/misco4/nasa-copyright create mode 100644 tests/cluecode/data/copyrights/misco4/nasa-copyright.yml create mode 100644 tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt create mode 100644 tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 663864a6d28..69e52d4804b 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -215,8 +215,16 @@ class CopyrightDetector(object): """ def __init__(self): - self.lexer = lex.Lexer(patterns) - self.parser = parse.Parser(grammar, trace=TRACE_DEEP, validate=VALIDATE) + """ + Initialize this detector with a lexer and a parser. + """ + self.lexer = lex.Lexer(matchers=PATTERNS) + self.parser = parse.Parser( + grammar=GRAMMAR, + loop=1, + trace=TRACE_DEEP, + validate=VALIDATE, + ) def detect(self, numbered_lines, @@ -591,7 +599,7 @@ def build_detection_from_node( _YEAR_THEN_YEAR_SHORT = fr'({_YEAR_OR_YEAR_YEAR_WITH_PUNCT}({_YEAR_SHORT_PUNCT})*)' _YEAR_DASH_PRESENT = _YEAR + r'[\-~]? ?[Pp]resent\.?,?' -patterns = [ +PATTERNS = [ ############################################################################ # COPYRIGHT ############################################################################ @@ -877,6 +885,7 @@ def build_detection_from_node( (r'^DISCLAIMS?$', 'JUNK'), (r'^SPECIFICALLY$', 'JUNK'), + (r'^identifying', 'JUNK'), (r'^IDENTIFICATION$', 'JUNK'), (r'^WARRANTIE?S?$', 'JUNK'), (r'^WARRANTS?$', 'JUNK'), @@ -1267,6 +1276,7 @@ def build_detection_from_node( (r'^But$', 'NN'), (r'^Builders?\.?$', 'NN'), (r'^Cacute$', 'NN'), + (r'^CD$', 'JUNK'), (r'^Cell.$', 'NN'), (r'^Change\.?[lL]og$', 'NN'), (r'^CHANGElogger$', 'NN'), @@ -1304,9 +1314,11 @@ def build_detection_from_node( (r'^Education$', 'NN'), (r'^Extended', 'NN'), (r'^Every$', 'NN'), - (r'^Exhibit$', 'NN'), + (r'^EXHIBIT$', 'JUNK'), + (r'^Exhibit$', 'JUNK'), (r'^Digitized', 'NN'), (r'^[Ds]istributed?.?$', 'NN'), + (r'^Distributions?', 'NN'), (r'^Multiply$', 'NN'), (r'^Convert$', 'NN'), (r'^Compute$', 'NN'), @@ -1314,7 +1326,6 @@ def build_detection_from_node( (r'^Hessian$', 'NN'), (r'^Include', 'NN'), (r'^Downstream', 'NN'), - (r'^Distributions?', 'NN'), (r'^Volumes?', 'NN'), (r'^Manuals?.?', 'NN'), (r'^Update.?', 'NN'), @@ -1435,8 +1446,8 @@ def build_detection_from_node( (r'^Packaging$', 'NN'), (r'^Patent', 'NN'), (r'^Pentium$', 'NN'), - (r'^[Pp]ermission', 'NN'), - (r'^PERMISSIONS?', 'NN'), + (r'^[Pp]ermission', 'JUNK'), + (r'^PERMISSIONS?', 'JUNK'), (r'^PGP$', 'NN'), (r'^Phrase', 'NN'), (r'^Plugin', 'NN'), @@ -1871,15 +1882,16 @@ def build_detection_from_node( # same for developed, etc... (r'^[Cc]oded$', 'AUTH2'), - (r'^[Rr]ecoded$', 'AUTH2'), - (r'^[Mm]odified$', 'AUTH2'), - (r'^[Cc]reated$', 'AUTH2'), + (r'^\(?[Rr]ecoded$', 'AUTH2'), + (r'^\(?[Mm]odified$', 'AUTH2'), + (r'^\(?[Cc]reated$', 'AUTH2'), # written is often mispelled - (r'^[Ww]ritt?e[dn]$', 'AUTH2'), + (r'^\(?[Ww]ritt?e[dn]$', 'AUTH2'), # rewritten is often mispelled - (r'^[Rr]ewritt?e[dn]$', 'AUTH2'), - (r'^[Mm]aintained$', 'AUTH2'), - (r'^[Dd]eveloped$', 'AUTH2'), + (r'^\(?[Rr]ewritt?e[dn]$', 'AUTH2'), + (r'^\(?[Mm]aintained$', 'AUTH2'), + (r'^\(?[Dd]eveloped$', 'AUTH2'), + (r'^\(?[Au]thored$', 'AUTH2'), # commiters is interesting, and so a tag of its own (r'[Cc]ommitters\.?,?', 'COMMIT'), @@ -1888,7 +1900,6 @@ def build_detection_from_node( (r'^[Aa]dmins?$', 'MAINT'), (r'^[Dd]evelopers?\.?$', 'MAINT'), (r'^[Mm]aintainers?\.?$', 'MAINT'), - (r'^[Cc]o-maintainers?\.?$', 'MAINT'), ############################################################################ # Conjunctions and related @@ -1965,7 +1976,7 @@ def build_detection_from_node( ############################################################################ # rare cases of trailing + signon years - (r'^20[0-1][0-9]\+$', 'YR-PLUS'), + (r'^20[0-2][0-9]\+$', 'YR-PLUS'), # year or year ranges # plain year with various leading and trailing punct @@ -2003,6 +2014,9 @@ def build_detection_from_node( # slash dates as in 08/95 (r'^(0?[1-9]|1[012])/[6-9][0-9][\.,]?$', 'YR'), + # ISO Dates: YYYY-MM-DD + (fr'^{_YEAR}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$', 'YR'), + # weird year (r'today.year', 'YR'), (r'^\$?LastChangedDate\$?$', 'YR'), @@ -2162,7 +2176,7 @@ def build_detection_from_node( # Comments in the Grammar are lines that start with # # End of line commenst are rules descriptions. # One rule per line. -grammar = """ +GRAMMAR = """ ####################################### # YEARS @@ -2336,7 +2350,7 @@ def build_detection_from_node( NAME: {+ +} #351 # Distributed Management Task Force - # NAME: { {3}} #881111 + NAME: { {3}} #881111 # @author Stephane Hillion NAME: { ? ? } #351.1 @@ -2407,10 +2421,10 @@ def build_detection_from_node( NAME-YEAR: { + ?} #5612 #Academy of Motion Picture Arts and Sciences - NAME: { } # 561 + NAME: { } #561 # Adam Weinberger and the GNOME Foundation - NAME: { } # 565 + NAME: { } #565 # (c) 1991-1992, Thomas G. Lane , Part of the Independent JPEG Group's NAME: { +} #566 @@ -2497,8 +2511,10 @@ def build_detection_from_node( # Timothy Terriberry, CSIRO, and other contributors ANDCO: { +} #960 + COMPANY: { +} #970 + # Copyright © 1998-2009 Bill Spitzak (spitzak@users.sourceforge.net ) and others, - COMPANY: { ? +} #970 + COMPANY: { ? +} #970.11 # de Nemours and Company NAME: {? +} #980 @@ -2596,7 +2612,7 @@ def build_detection_from_node( # Copyright 2015 The Error Prone Authors. NAME: { } #196023 - # Copyright (C) Suresh P + # Copyright (C) Suresh P NAME: { } #19601.1 # Copyright or Copr. Mines Paristech, France - Mark NOBLE, Alexandrine GESRET @@ -2611,9 +2627,14 @@ def build_detection_from_node( # Copyright (C) 1998-2001 VideoLAN ( Johan Bilien and Gildas Bazin ) NAME: { } #19653 + # by the Initial Developer + INITIALDEV: {? } #19663 + + # UNIVERTSITY OF CHICAGO + NAME: { } #19673 + -################################# #COPYRIGHT: { } #1802 -###### +####################################### # VARIOUS FORMS OF COPYRIGHT ####################################### @@ -2649,9 +2670,6 @@ def build_detection_from_node( # Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. COPYRIGHT: {+ + *} #157999 - # portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. - COPYRIGHT: { } #157998 - COPYRIGHT: {+ + ?} #1590 # // (c) (C) → © @@ -2740,8 +2758,8 @@ def build_detection_from_node( # (c) Copyright 1985-1999 SOME TECHNOLOGY SYSTEMS COPYRIGHT2: { ? ?} #2271 - # Minpack Copyright Notice (1999) University of Chicago - COPYRIGHT: { } #2273.1 + # Copyright Notice (1999) University of Chicago. All rights reserved + COPYRIGHT: { ? } #2271.1 # NAME-COPY is a name with a trailing copyright # Daisy (c) 1998 @@ -2789,7 +2807,6 @@ def build_detection_from_node( # Copyright (C) 2006 XStream committers. # Copyright (c) 2019-2021, Open source contributors. # Copyright 2007 ZXing authors - # Copyright (c) 2002 the Initial Developer # Copyright (c) 2024 bgme . COPYRIGHT: {+ + ? ? ?} #22793.3 @@ -2881,9 +2898,6 @@ def build_detection_from_node( # maintainer Norbert Tretkowski 2005-04-16 AUTHOR: { ?} #26382 - # Russ Dill 2001-2003 - COPYRIGHT: { } #2638 - # (C) 2001-2009, Takuo KITAME, Bart Martens, and Canonical, LTD COPYRIGHT: { } #26381 @@ -3081,9 +3095,6 @@ def build_detection_from_node( # Copyright OProfile authors COPYRIGHT: { ?+ } #83004 - # (C) Distributed Management Task Force (Distributed is an NN) - # COPYRIGHT: { } #83010 - # Copyright (c) 2014 The Rust Project Developers COPYRIGHT: { } #83020 @@ -3092,7 +3103,38 @@ def build_detection_from_node( # Copyright: 2004-2007 by Internet Systems Consortium, Inc. ("ISC") # 1995-2003 by Internet Software Consortium - COPYRIGHT: { } #1615 + COPYRIGHT: { } #1615 + + # Russ Dill 2001-2003 + # Rewrited by Vladimir Oleynik (C) 2003 + COPYRIGHT: { } #22793.5 + + # portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. + COPYRIGHT: { } #157998 + + # Minpack Copyright Notice (1999) University of Chicago + COPYRIGHT: { } #2273.1 + + # Portions created by the Initial Developer are Copyright (C) + # the Initial Developer. All Rights Reserved. + COPYRIGHT: { + ? } #2609.1 + + # Portions created by the Initial Developer are Copyright (C) + # the Initial Developer. All Rights Reserved. + # and + # Portions created by the Initial Developer are Copyright (C) 2002 + # the Initial Developer. All Rights Reserved. + COPYRIGHT: { ?} #2609.2 + + # Copyright (C) the Initial Developer. + COPYRIGHT: {+ } #35012 + + # (C) Distributed Management Task Force (Distributed is an NN) + # COPYRIGHT: { ? } #83010 + + # Gracenote, Inc., copyright © 2000-2008 Gracenote. + # Gracenote Software, copyright © 2000-2008 Gracenote. + COPYRIGHT: { {1,2} } #157999.12 ####################################### # Copyright is held by .... @@ -3100,7 +3142,6 @@ def build_detection_from_node( # Copyright is held by .... COPYRIGHT: { + } #10989898 - ####################################### # Authors ####################################### @@ -3194,7 +3235,8 @@ def build_detection_from_node( # Copyright (c) 2015 Jon Schlinkert, contributors. COPYRIGHT: { } #420121 - + # J. Schoenwaelder, Copyright (c) 1999 + # COPYRIGHT: { } #22793.7 ####################################### # Last resort catch all ending with ALLRIGHTRESERVED @@ -3246,6 +3288,19 @@ def refine_copyright(c): return c.strip() +def remove_dupe_holder(h): + """ + Remove duplicated holders + """ + dupes_holders = { + "the Initial Developer the Initial Developer": "the Initial Developer", + } + for src, tgt in dupes_holders.items(): + if src in h: + h = h.replace(src, tgt) + return h + + def refine_holder(h): """ Refine a detected holder. @@ -3278,6 +3333,7 @@ def refine_holder(h): h = h.strip('+- ') h = strip_trailing_period(h) h = h.strip('+- ') + h = remove_dupe_holder(h) h = ' '.join(h.split()) if h and h.lower() not in HOLDERS_JUNK: return h @@ -3694,7 +3750,9 @@ def remove_some_extra_words_and_punct(c): c = c.replace(".net'", ".net") c = c.replace("mailto:", "") c = c.replace("@see", "") - return c + if c.endswith('as represented by'): + c, _, _ = c.partition('as represented by') + return c.strip() def strip_prefixes(s, prefixes=()): diff --git a/src/licensedcode/data/licenses/cups.LICENSE b/src/licensedcode/data/licenses/cups.LICENSE index 86ba0a7fa8e..92a489326e5 100644 --- a/src/licensedcode/data/licenses/cups.LICENSE +++ b/src/licensedcode/data/licenses/cups.LICENSE @@ -16,7 +16,6 @@ ignorable_holders: - Jelmer Vernooij ignorable_authors: - Apple Inc. - - permission from Apple Inc. ignorable_urls: - http://www.cups.org/ --- @@ -74,4 +73,4 @@ Altered source versions must be plainly marked as such, and must not be misrepre This notice may not be removed or altered from any source distribution. Trademarks -CUPS and the CUPS logo (the "CUPS Marks") are trademarks of Apple Inc. Apple grants you a non-exclusive and non-transferable right to use the CUPS Marks in any direct port or binary distribution incorporating CUPS software and in any promotional material therefor. You agree that your products will meet the highest levels of quality and integrity for similar goods, not be unlawful, and be developed, manufactured, and distributed in compliance with this license. You will not interfere with Apple's rights in the CUPS Marks, and all use of the CUPS Marks shall inure to the benefit of Apple. This license does not apply to use of the CUPS Marks in a derivative products, which requires prior written permission from Apple Inc. \ No newline at end of file +CUPS and the CUPS logo (the "CUPS Marks") are trademarks of Apple Inc. Apple grants you a non-exclusive and non-transferable right to use the CUPS Marks in any direct port or binary distribution incorporating CUPS software and in any promotional material therefor. You agree that your products will meet the highest levels of quality and integrity for similar goods, not be unlawful, and be developed, manufactured, and distributed in compliance with this license. You will not interfere with Apple's rights in the CUPS Marks, and all use of the CUPS Marks shall inure to the benefit of Apple. This license does not apply to use of the CUPS Marks in a derivative products, which requires prior written permission from Apple Inc. diff --git a/src/licensedcode/data/licenses/ms-directx-sdk-eula.LICENSE b/src/licensedcode/data/licenses/ms-directx-sdk-eula.LICENSE index 4a9786e5f64..a70860b93a1 100644 --- a/src/licensedcode/data/licenses/ms-directx-sdk-eula.LICENSE +++ b/src/licensedcode/data/licenses/ms-directx-sdk-eula.LICENSE @@ -7,8 +7,6 @@ owner: Microsoft spdx_license_key: LicenseRef-scancode-ms-directx-sdk-eula text_urls: - ftp://ftp.physik.hu-berlin.de/pub/useful/dx7asdk/DXF/license/directx%20sdk%20eula.txt -ignorable_authors: - - permission from Microsoft Corporation --- DirectX Software Development Kit END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE @@ -74,4 +72,4 @@ If you acquired this product in Canada, this Agreement is governed by the laws o If this product was acquired outside the United States, then local law may apply. -Should you have any questions concerning this Agreement, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Customer Sales and Service/One Microsoft Way/Redmond, WA 98052-6399. \ No newline at end of file +Should you have any questions concerning this Agreement, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Customer Sales and Service/One Microsoft Way/Redmond, WA 98052-6399. diff --git a/src/licensedcode/data/licenses/mtll.LICENSE b/src/licensedcode/data/licenses/mtll.LICENSE index ade9b531256..3fa49ad205d 100644 --- a/src/licensedcode/data/licenses/mtll.LICENSE +++ b/src/licensedcode/data/licenses/mtll.LICENSE @@ -10,10 +10,6 @@ notes: | derived from the Apache Software License v1.1, but it is modified in several ways. It is Free, but GPL-incompatible. spdx_license_key: MTLL -ignorable_authors: - - at the University of Notre Dame, the Pervasive Technology Labs at Indiana University, - and Dresden University of Technology - - permission, please contact Indiana University Advanced Research & Technology --- Software License for MTL @@ -36,4 +32,4 @@ Alternatively, this acknowledgement may appear in the software itself, and where TUD and IU provide no reassurances that the source code provided does not infringe the patent or any other intellectual property rights of any other entity. TUD and IU disclaim any liability to any recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. -LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY GIVE NO WARRANTIES AND MAKE NO REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY MAKE NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. \ No newline at end of file +LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY GIVE NO WARRANTIES AND MAKE NO REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY MAKE NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. diff --git a/src/licensedcode/data/licenses/nero-eula.LICENSE b/src/licensedcode/data/licenses/nero-eula.LICENSE index 647dcf4c692..de1c5565fc3 100644 --- a/src/licensedcode/data/licenses/nero-eula.LICENSE +++ b/src/licensedcode/data/licenses/nero-eula.LICENSE @@ -15,9 +15,9 @@ ignorable_copyrights: - Copyright (c) 1991-2, RSA Data Security, Inc. - Copyright (c) 1992-1999 Dolby Laboratories, Inc. - Copyright (c) 1996-2012 Nero AG and its licensors - - Copyright (c) 1999-2002. Microsoft Corporation - Copyright (c) 2008 Microsoft Corporation - Copyright 2011 Dolby Laboratories + - Media Technologies. Copyright (c) 1999-2002. Microsoft Corporation - copyright (c) 1998-2005 The OpenSSL Project - copyright (c) 2000-2008 Gracenote - copyright (c) 2000-2008 Gracenote. Gracenote Software @@ -33,6 +33,7 @@ ignorable_holders: - Dr Brian Gladman, Worcester, UK. - Gracenote - Gracenote. Gracenote Software + - Media Technologies. Microsoft Corporation - Microsoft Corporation - Nero AG and its licensors - Nero AG. diff --git a/src/licensedcode/data/licenses/occt-pl.LICENSE b/src/licensedcode/data/licenses/occt-pl.LICENSE index cd35e36cfd3..a49b1d6d97c 100644 --- a/src/licensedcode/data/licenses/occt-pl.LICENSE +++ b/src/licensedcode/data/licenses/occt-pl.LICENSE @@ -7,11 +7,13 @@ owner: Open Cascade homepage_url: http://www.opencascade.com/content/occt-public-license spdx_license_key: OCCT-PL ignorable_copyrights: + - Copyright The Initial Developer - copyright (c) OPEN CASCADE SAS, 2001 - copyright (c) Open CASCADE SAS, 2001 ignorable_holders: - OPEN CASCADE SAS - Open CASCADE SAS + - The Initial Developer --- Open CASCADE Technology Public License @@ -124,4 +126,4 @@ Modifications to the Original Code have been made by . Modifications are copyri The software Open CASCADE Technology and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. Please see the License for the specific terms and conditions governing rights and limitations under the License" -End of Schedule "B" \ No newline at end of file +End of Schedule "B" diff --git a/src/licensedcode/data/licenses/qt-commercial-agreement-4.4.1.LICENSE b/src/licensedcode/data/licenses/qt-commercial-agreement-4.4.1.LICENSE index add96db3f36..38ae9830f49 100644 --- a/src/licensedcode/data/licenses/qt-commercial-agreement-4.4.1.LICENSE +++ b/src/licensedcode/data/licenses/qt-commercial-agreement-4.4.1.LICENSE @@ -10,7 +10,6 @@ other_urls: - https://www.qt.io/contact-us ignorable_authors: - The Qt Company - - permission from The Qt Company ignorable_urls: - https://opensource.org/licenses --- @@ -432,4 +431,4 @@ If any provision of this Agreement shall be adjudged by any court of competent j 14.13. Marketing Rights -Parties have agreed upon Marketing Rights pursuant to Appendix 7, if any. \ No newline at end of file +Parties have agreed upon Marketing Rights pursuant to Appendix 7, if any. diff --git a/src/licensedcode/data/licenses/srgb.LICENSE b/src/licensedcode/data/licenses/srgb.LICENSE index f07c4263e70..46417e7b385 100644 --- a/src/licensedcode/data/licenses/srgb.LICENSE +++ b/src/licensedcode/data/licenses/srgb.LICENSE @@ -6,8 +6,6 @@ category: Proprietary Free owner: HP - Hewlett Packard homepage_url: https://web.archive.org/web/20011024060436/http://www.srgb.com/usingsrgb.html spdx_license_key: LicenseRef-scancode-srgb -ignorable_authors: - - prior permission. Hewlett-Packard Company --- To anyone who acknowledges that the file "sRGB Color Space Profile.icm" @@ -17,4 +15,4 @@ granted without fee, provided that the file is not changed including the HP copyright notice tag, and that the name of Hewlett-Packard Company not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Hewlett-Packard Company makes -no representations about the suitability of this software for any purpose. \ No newline at end of file +no representations about the suitability of this software for any purpose. diff --git a/src/licensedcode/data/licenses/wifi-alliance.LICENSE b/src/licensedcode/data/licenses/wifi-alliance.LICENSE index bb82eeb9225..4cdc34bcfd8 100644 --- a/src/licensedcode/data/licenses/wifi-alliance.LICENSE +++ b/src/licensedcode/data/licenses/wifi-alliance.LICENSE @@ -5,8 +5,6 @@ name: Wi-Fi Alliance License category: Commercial owner: Wi-Fi Alliance spdx_license_key: LicenseRef-scancode-wifi-alliance -ignorable_authors: - - permission from Wi-Fi Alliance --- Confidential not for redistribution @@ -42,4 +40,4 @@ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/licensedcode/data/rules/bsd-new_951.RULE b/src/licensedcode/data/rules/bsd-new_951.RULE index cb298450def..5c0139cb377 100644 --- a/src/licensedcode/data/rules/bsd-new_951.RULE +++ b/src/licensedcode/data/rules/bsd-new_951.RULE @@ -2,6 +2,10 @@ license_expression: bsd-new is_license_notice: yes relevance: 99 +ignorable_copyrights: + - copyright its authors +ignorable_holders: + - its authors ignorable_urls: - http://www.opensource.org/licenses/bsd-license.php --- @@ -11,4 +15,4 @@ Copyright and License This code is copyright its authors, and is distributed under the `BSD License`_. -.. _BSD License: http://www.opensource.org/licenses/bsd-license.php \ No newline at end of file +.. _BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/src/licensedcode/data/rules/commercial-license_38.RULE b/src/licensedcode/data/rules/commercial-license_38.RULE index f996c441e02..6542be2690d 100644 --- a/src/licensedcode/data/rules/commercial-license_38.RULE +++ b/src/licensedcode/data/rules/commercial-license_38.RULE @@ -2,8 +2,6 @@ license_expression: commercial-license is_license_text: yes relevance: 100 -ignorable_authors: - - prior permission from eGenix.com --- EGENIX.COM COMMERCIAL LICENSE AGREEMENT VERSION 1.0.0 @@ -158,4 +156,4 @@ The controlling language of this License Agreement is English. If Licensee has r By downloading, copying, installing or otherwise using the Software, Licensee agrees to be bound by the terms and conditions of this License Agreement. -For question regarding this license agreement, please write to: \ No newline at end of file +For question regarding this license agreement, please write to: diff --git a/src/licensedcode/data/rules/cpal-1.0_or_commercial-license_1.RULE b/src/licensedcode/data/rules/cpal-1.0_or_commercial-license_1.RULE index 30cdb6cf5c5..5bc3c7cf4da 100644 --- a/src/licensedcode/data/rules/cpal-1.0_or_commercial-license_1.RULE +++ b/src/licensedcode/data/rules/cpal-1.0_or_commercial-license_1.RULE @@ -2,8 +2,6 @@ license_expression: cpal-1.0 OR commercial-license is_license_notice: yes notes: https://github.com/OptimEnterprises/sxweb/blob/217711ee8107fb3bdaba10f22c894f65808ebe45/application/modules/menu/views/scripts/index/volmobile.phtml#L7 -ignorable_authors: - - Initial Developer ignorable_urls: - http://opensource.org/licenses/cpal_1.0 --- @@ -37,4 +35,4 @@ The contents of this file are subject to the Common Public Attribution License your decision by deleting the provisions above and replace them with the notice and other provisions required by the. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the - . \ No newline at end of file + . diff --git a/src/licensedcode/data/rules/gpl-2.0_630.RULE b/src/licensedcode/data/rules/gpl-2.0_630.RULE index 2be21444dce..b3bf48a9007 100644 --- a/src/licensedcode/data/rules/gpl-2.0_630.RULE +++ b/src/licensedcode/data/rules/gpl-2.0_630.RULE @@ -4,8 +4,6 @@ is_license_notice: yes minimum_coverage: 95 notes: this is no longer mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus since there is this addition "For xxx purposes, GPLv2 is the winning license." -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -41,4 +39,4 @@ and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. ***** END LICENSE BLOCK ***** */ -For purposes, GPLv2 is the winning license. */ \ No newline at end of file +For purposes, GPLv2 is the winning license. */ diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_10.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_10.RULE index 54ede118b3d..7e5bb77d813 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_10.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_10.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1997-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1997-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_11.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_11.RULE index 6c64126cec1..6050f344dee 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_11.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_11.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1998-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_12.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_12.RULE index 603ae9c7e6b..df09f85e65a 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_12.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_12.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1998-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_13.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_13.RULE index d2a487c8563..55a89c0270c 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_13.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_13.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1997-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1997-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_14.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_14.RULE index fe598665054..e71a6c77630 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_14.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_14.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -40,4 +38,4 @@ ignorable_urls: * MPL, indicate your decision by deleting the provisions above and replacing * them with the notice and other provisions required by the GPL. If you do * not delete the provisions above, a recipient may use your version of this - * file under either the {{MPL or the GPL.}} \ No newline at end of file + * file under either the {{MPL or the GPL.}} diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_15.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_15.RULE index 145c37de0b5..8253a9531cc 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_15.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_15.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1997-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1997-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -42,4 +40,4 @@ ignorable_urls: * MPL, indicate your decision by deleting the provisions above and replacing * them with the notice and other provisions required by the GPL. If you do * not delete the provisions above, a recipient may use your version of this - * file under either the {{MPL or the GPL.}} \ No newline at end of file + * file under either the {{MPL or the GPL.}} diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_16.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_16.RULE index 01e39ee9730..282087db0ab 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_16.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_16.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1998-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -24,4 +22,4 @@ Contributor(s): {{Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the "GPL")}}, in which case the provisions of the GPL are applicable instead of those above. -If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replacing them with the notice and other provisions required by the GPL. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. \ No newline at end of file +If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replacing them with the notice and other provisions required by the GPL. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_17.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_17.RULE index 2bee45d1f0f..a5d956d8f18 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_17.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_17.RULE @@ -2,12 +2,10 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1997-1999 the Initial Developer - - Copyright (c) 1998-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1997-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_6.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_6.RULE index 5d302a7c61a..6e87a4d2c64 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_6.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_6.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes minimum_coverage: 90 ignorable_copyrights: - - Copyright (c) 1998-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_8.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_8.RULE index 466cc8c6f4f..e342d991b47 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_8.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_8.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1997-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1997-1999 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_9.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_9.RULE index 55d65c176dc..e91b6a05cac 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_9.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_9.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -43,4 +41,4 @@ ignorable_urls: * not delete the provisions above, a recipient may use your version of this * file under either the {{MPL or the GPL.}} * - * ***** END LICENSE BLOCK ***** */ \ No newline at end of file + * ***** END LICENSE BLOCK ***** */ diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_12.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_12.RULE index 7565ed46802..27d179354f0 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_12.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_12.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_14.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_14.RULE index 281ace16713..988f82e4b1c 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_14.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_14.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_18.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_18.RULE index b6cde57cdfc..9a23c513ac1 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_18.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_18.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright the Initial Developer + - Portions created by the Initial Developer are Copyright the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -43,4 +41,4 @@ ignorable_urls: * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ***** END LICENSE BLOCK ***** */ \ No newline at end of file + * ***** END LICENSE BLOCK ***** */ diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_19.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_19.RULE index 2868553a948..2cf2b23a3dd 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_19.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_19.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright the Initial Developer + - Portions created by the Initial Developer are Copyright the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -48,4 +46,4 @@ under the terms of the MPL 1.1: // the provisions above, a recipient may use your version of this file under // the terms of any one of the MPL, the GPL or the LGPL. // - // ***** END LICENSE BLOCK ***** \ No newline at end of file + // ***** END LICENSE BLOCK ***** diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_20.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_20.RULE index fb24295150f..b5042dd3138 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_20.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_20.RULE @@ -2,8 +2,6 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -40,4 +38,4 @@ ignorable_urls: // the provisions above, a recipient may use your version of this file under // the terms of any one of the MPL, the GPL or the LGPL. // -// ***** END LICENSE BLOCK ***** \ No newline at end of file +// ***** END LICENSE BLOCK ***** diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_24.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_24.RULE index a2f9f570e6d..35c9ab80df7 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_24.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_24.RULE @@ -2,8 +2,6 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -39,4 +37,4 @@ ignorable_urls: // decision by deleting the provisions above and replace them with the notice // and other provisions required by the GPL or the LGPL. If you do not delete // the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. \ No newline at end of file +// the terms of any one of the MPL, the GPL or the LGPL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_25.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_25.RULE index e91816769b4..800b154745c 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_25.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_25.RULE @@ -2,8 +2,6 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -37,4 +35,4 @@ ignorable_urls: // decision by deleting the provisions above and replace them with the notice // and other provisions required by the GPL or the LGPL. If you do not delete // the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. \ No newline at end of file +// the terms of any one of the MPL, the GPL or the LGPL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_26.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_26.RULE index 3b83f8ac806..f2827f5e7e9 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_26.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_26.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -45,4 +43,4 @@ ignorable_urls: // the provisions above, a recipient may use your version of this file under // the terms of any one of the MPL, the GPL or the LGPL. // -// ***** END LICENSE BLOCK ***** \ No newline at end of file +// ***** END LICENSE BLOCK ***** diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_28.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_28.RULE index 1185cf6f6ca..ac30ca7f76c 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_28.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_28.RULE @@ -3,11 +3,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -46,4 +44,4 @@ ignorable_urls: * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ***** END LICENSE BLOCK ***** */ \ No newline at end of file + * ***** END LICENSE BLOCK ***** */ diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_31.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_31.RULE index 92ba3db6204..ad2650e3ca7 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_31.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_31.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2005 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2005 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_32.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_32.RULE index 46ed526355e..6923d346aea 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_32.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_32.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2001 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2001 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_33.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_33.RULE index 11c5948c048..b05bc520bb5 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_33.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_33.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2001 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2001 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_35.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_35.RULE index 7d5fb0c344e..ef1e597d219 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_35.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_35.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_37.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_37.RULE index ee13b6ad250..3d856690bbc 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_37.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_37.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_38.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_38.RULE index a36c8fab7ae..fadb5f99145 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_38.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_38.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -44,4 +42,4 @@ and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. -***** END LICENSE BLOCK ***** */ \ No newline at end of file +***** END LICENSE BLOCK ***** */ diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_39.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_39.RULE index eacfc7b2f56..b7f2bc29a8b 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_39.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_39.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2003 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2003 the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_40.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_40.RULE index 6345a01e292..3a1b85b7c04 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_40.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_40.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -44,4 +42,4 @@ ignorable_urls: * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ***** END LICENSE BLOCK ***** */ \ No newline at end of file + * ***** END LICENSE BLOCK ***** */ diff --git a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_9.RULE b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_9.RULE index f9227e9b41f..26eccdf1eeb 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_9.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_gpl-2.0-plus_or_lgpl-2.1-plus_9.RULE @@ -2,11 +2,9 @@ license_expression: mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus is_license_notice: yes ignorable_copyrights: - - Copyright (c) the Initial Developer + - Portions created by the Initial Developer are Copyright (c) the Initial Developer ignorable_holders: - the Initial Developer -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -45,4 +43,4 @@ ignorable_urls: # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # -# ***** END LICENSE BLOCK ***** \ No newline at end of file +# ***** END LICENSE BLOCK ***** diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_10.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_10.RULE index d4b442b4c09..4ef35f94124 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_10.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_10.RULE @@ -1,8 +1,6 @@ --- license_expression: mpl-1.1 OR lgpl-2.1-plus is_license_text: yes -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -172,4 +170,4 @@ EXHIBIT A -Mozilla Public License. Contributor(s): ______________________________________. - Alternatively, the contents of this file may be used under the terms of the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of either the MPL or the LGPL. \ No newline at end of file + Alternatively, the contents of this file may be used under the terms of the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of either the MPL or the LGPL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_9.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_9.RULE index 552a410b3a3..205ac277ae7 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_9.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_9.RULE @@ -4,8 +4,6 @@ is_license_reference: yes relevance: 100 minimum_coverage: 99 notes: javassist license choice -ignorable_authors: - - the Initial Developer --- the Original Code is . @@ -23,4 +21,4 @@ Alternatively, the contents of this file may be used under the terms of decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under -the terms of either the MPL or the LGPL. \ No newline at end of file +the terms of either the MPL or the LGPL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_10.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_10.RULE index 7558f8eea68..2e756442173 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_10.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_10.RULE @@ -6,8 +6,6 @@ ignorable_copyrights: - Copyright (c) Shigeru Chiba ignorable_holders: - Shigeru Chiba -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -36,4 +34,4 @@ use your version of this software under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL or the AL. If you do not delete the provisions above, a recipient may use your version of this -software under the terms of any one of the MPL, the LGPL or the AL. \ No newline at end of file +software under the terms of any one of the MPL, the LGPL or the AL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_11.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_11.RULE index 5e9f19b2c70..908b01d2156 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_11.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_11.RULE @@ -5,8 +5,6 @@ ignorable_copyrights: - Copyright (c) Shigeru Chiba ignorable_holders: - Shigeru Chiba -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -34,4 +32,4 @@ use your version of this software under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL or the AL. If you do not delete the provisions above, a recipient may use your version of this -software under the terms of any one of the MPL, the LGPL or the AL. \ No newline at end of file +software under the terms of any one of the MPL, the LGPL or the AL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_12.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_12.RULE index 790fb303787..f63246eac8f 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_12.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_12.RULE @@ -7,8 +7,6 @@ ignorable_copyrights: - Copyright (c) 1999- Shigeru Chiba ignorable_holders: - Shigeru Chiba -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -38,4 +36,4 @@ and not to allow others to use your version of this software under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL or the AL. If you do not delete the provisions above, a recipient may use your version of this -software under the terms of any one of the MPL, the LGPL or the AL. \ No newline at end of file +software under the terms of any one of the MPL, the LGPL or the AL. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_4.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_4.RULE index 6975670453e..5cebf005832 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_4.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_4.RULE @@ -1,8 +1,6 @@ --- license_expression: mpl-1.1 OR lgpl-2.1-plus OR apache-2.0 is_license_notice: yes -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -41,4 +39,4 @@ under the MPL, you must obtain a separate package including only Javassist but not the other part of JBoss. All the contributors to the original source tree have agreed to -the original license term described above. \ No newline at end of file +the original license term described above. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_7.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_7.RULE index a120d87116b..4595bff6ca9 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_7.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_7.RULE @@ -1,8 +1,6 @@ --- license_expression: mpl-1.1 OR lgpl-2.1-plus OR apache-2.0 is_license_notice: yes -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -42,4 +40,4 @@ under the MPL, you must obtain a separate package including only Javassist but not the other part of JBoss. All the contributors to the original source tree have agreed to -the original license term described above. \ No newline at end of file +the original license term described above. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_8.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_8.RULE index da78fbeaaf0..cc9aeb327bf 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_8.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_8.RULE @@ -5,8 +5,6 @@ ignorable_copyrights: - Copyright (c) Shigeru Chiba ignorable_holders: - Shigeru Chiba -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -46,4 +44,4 @@ under the MPL, you must obtain a separate package including only Javassist but not the other part of JBoss. All the contributors to the original source tree have agreed to -the original license term described above. \ No newline at end of file +the original license term described above. diff --git a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_9.RULE b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_9.RULE index 1054429aae1..8e14dd0ce54 100644 --- a/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_9.RULE +++ b/src/licensedcode/data/rules/mpl-1.1_or_lgpl-2.1-plus_or_apache-2.0_9.RULE @@ -5,8 +5,6 @@ ignorable_copyrights: - Copyright (c) Shigeru Chiba ignorable_holders: - Shigeru Chiba -ignorable_authors: - - the Initial Developer ignorable_urls: - http://www.mozilla.org/MPL/ --- @@ -36,4 +34,4 @@ use your version of this software under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL or the AL. If you do not delete the provisions above, a recipient may use your version of this -software under the terms of any one of the MPL, the LGPL or the AL. \ No newline at end of file +software under the terms of any one of the MPL, the LGPL or the AL. diff --git a/src/licensedcode/data/rules/proprietary-license_637.RULE b/src/licensedcode/data/rules/proprietary-license_637.RULE index 1c68f25e48f..ad422de73fc 100644 --- a/src/licensedcode/data/rules/proprietary-license_637.RULE +++ b/src/licensedcode/data/rules/proprietary-license_637.RULE @@ -1,10 +1,12 @@ --- license_expression: proprietary-license is_license_text: yes +ignorable_authors: + - Apple's SF Pro notes: https://github.com/menahishayan/HomeAssistant-Cupertino-Icons/blob/734b65202915e4d2a8a77072d909d8630e027b1c/LICENSE --- Icons included here are only ones that are not explictly marked as 'cannot be modified' by Apple's SF Pro Symbols Viewer v2.0.0 and are provided on an AS IS basis. Usage rights subject -to Apple Inc's SF Pro Symbols' usage rights for modifyable symbols. \ No newline at end of file +to Apple Inc's SF Pro Symbols' usage rights for modifyable symbols. diff --git a/src/licensedcode/data/rules/public-domain_or_mit_7.RULE b/src/licensedcode/data/rules/public-domain_or_mit_7.RULE index 37d0a453beb..107a6923385 100644 --- a/src/licensedcode/data/rules/public-domain_or_mit_7.RULE +++ b/src/licensedcode/data/rules/public-domain_or_mit_7.RULE @@ -4,6 +4,10 @@ is_license_notice: yes notes: Seen in JSONCPP ignorable_urls: - http://en.wikipedia.org/wiki/MIT_License +ignorable_copyrights: + - Copyright The Authors +ignorable_holders: + - The Authors --- Authors explicitly disclaim copyright in all @@ -23,4 +27,4 @@ described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License -The full text of the MIT License follows: \ No newline at end of file +The full text of the MIT License follows: diff --git a/src/licensedcode/data/rules/wifi-alliance.RULE b/src/licensedcode/data/rules/wifi-alliance.RULE index 3b0a9248a67..f35dd64d31d 100644 --- a/src/licensedcode/data/rules/wifi-alliance.RULE +++ b/src/licensedcode/data/rules/wifi-alliance.RULE @@ -1,8 +1,6 @@ --- license_expression: wifi-alliance is_license_text: yes -ignorable_authors: - - permission from Wi-Fi Alliance --- License is granted only to Wi-Fi Alliance members and designated Wi-Fi @@ -32,4 +30,4 @@ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/licensedcode/data/rules/zpl-1.1_2.RULE b/src/licensedcode/data/rules/zpl-1.1_2.RULE index f3f7d8f6d0a..92d910d3773 100644 --- a/src/licensedcode/data/rules/zpl-1.1_2.RULE +++ b/src/licensedcode/data/rules/zpl-1.1_2.RULE @@ -3,7 +3,6 @@ license_expression: zpl-1.1 is_license_text: yes ignorable_authors: - Zope Corporation - - permission from Zope Corporation ignorable_urls: - http://www.zope.com/ --- @@ -23,4 +22,4 @@ Redistribution and use in source and binary forms, with or without modification, "This product includes software developed by Zope Corporation for use in the Z Object Publishing Environment (http://www.zope.com/)." Intact (re-)distributions of any official Zope release do not require an external acknowledgement. - 6. Modifications are encouraged but must be packaged separately as patches to official Zope releases. Distributions that do not clearly separate the patches from the original work must be clearly labeled as unofficial distributions. Modifications which do not carry the name Zope may be packaged in any form, as long as they conform to all of the clauses above. \ No newline at end of file + 6. Modifications are encouraged but must be packaged separately as patches to official Zope releases. Distributions that do not clearly separate the patches from the original work must be clearly labeled as unofficial distributions. Modifications which do not carry the name Zope may be packaged in any form, as long as they conform to all of the clauses above. diff --git a/tests/cluecode/data/copyright_fossology/testdata22_raw b/tests/cluecode/data/copyright_fossology/testdata22_raw index 15dc3116088..345f43185d9 100644 --- a/tests/cluecode/data/copyright_fossology/testdata22_raw +++ b/tests/cluecode/data/copyright_fossology/testdata22_raw @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Netscape Communications Corporation. - Portions created by the Initial Developer are Copyright (c) 1998-1999 + Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer. All Rights Reserved. Contributor(s): diff --git a/tests/cluecode/data/copyright_fossology/testdata87_raw b/tests/cluecode/data/copyright_fossology/testdata87_raw index 98b8fab91f5..5addfce6e31 100644 --- a/tests/cluecode/data/copyright_fossology/testdata87_raw +++ b/tests/cluecode/data/copyright_fossology/testdata87_raw @@ -5,8 +5,8 @@ It was downloaded from http://ftp.isc.org/isc/dhcp/ Upstream Author: Internet Systems Consortium (ISC) -Copyright 2004-2007 by Internet Systems Consortium, Inc. ("ISC") - 1995-2003 by Internet Software Consortium +Copyright 2004-2007 by Internet Systems Consortium, Inc. 'ISC + 1995-2003 by Internet Software Consortium License: diff --git a/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL.yml b/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL.yml index a5285cdd196..50d775dbc73 100644 --- a/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL.yml +++ b/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/copyrights/epiphany_browser_data-epiphany_browser_data.label.yml b/tests/cluecode/data/copyrights/epiphany_browser_data-epiphany_browser_data.label.yml index 060e44ffad2..679322b4ce3 100644 --- a/tests/cluecode/data/copyrights/epiphany_browser_data-epiphany_browser_data.label.yml +++ b/tests/cluecode/data/copyrights/epiphany_browser_data-epiphany_browser_data.label.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2004 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2004 the Initial Developer - (c) 2003-2007, the Debian GNOME team holders: - the Initial Developer diff --git a/tests/cluecode/data/copyrights/misco4/initial-dev-again.txt b/tests/cluecode/data/copyrights/misco4/initial-dev-again.txt new file mode 100644 index 00000000000..92b8bc5f145 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/initial-dev-again.txt @@ -0,0 +1,2 @@ + Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. diff --git a/tests/cluecode/data/copyrights/misco4/initial-dev-again.txt.yml b/tests/cluecode/data/copyrights/misco4/initial-dev-again.txt.yml new file mode 100644 index 00000000000..7ffcfac7947 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/initial-dev-again.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Portions created by the Initial Developer are Copyright (c) 2005 the Initial Developer +holders: + - the Initial Developer +holders_summary: + - value: the Initial Developer + count: 1 diff --git a/tests/cluecode/data/copyrights/misco4/nasa-copyright b/tests/cluecode/data/copyrights/misco4/nasa-copyright new file mode 100644 index 00000000000..14ec5a126d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/nasa-copyright @@ -0,0 +1,4 @@ + Copyright (C) 2006-2010 United States Government as represented by + the Administrator of the National Aeronautics and Space Administration. + All Rights Reserved. + diff --git a/tests/cluecode/data/copyrights/misco4/nasa-copyright.yml b/tests/cluecode/data/copyrights/misco4/nasa-copyright.yml new file mode 100644 index 00000000000..28109c8b811 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/nasa-copyright.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Copyright (c) 2006-2010 United States Government as represented by the Administrator of + the National Aeronautics and Space Administration +holders: + - United States Government as represented by the Administrator of the National Aeronautics + and Space Administration +holders_summary: + - value: United States Government as represented by the Administrator of the National Aeronautics + and Space Administration + count: 1 diff --git a/tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt b/tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt new file mode 100644 index 00000000000..f4de210f606 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt @@ -0,0 +1,3 @@ +Portions created by the Initial Developer are Copyright (C) +the Initial Developer. All Rights Reserved. + diff --git a/tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt.yml b/tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt.yml new file mode 100644 index 00000000000..96c2c1fc580 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/portions-initial-developer.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - holders_summary + - authors +copyrights: + - Portions created by the Initial Developer are Copyright (c) the Initial Developer +holders: + - the Initial Developer +holders_summary: + - value: the Initial Developer + count: 1 diff --git a/tests/cluecode/data/generated/copyright_33.txt.yml b/tests/cluecode/data/generated/copyright_33.txt.yml index 4410dc3cd16..61b69b13034 100644 --- a/tests/cluecode/data/generated/copyright_33.txt.yml +++ b/tests/cluecode/data/generated/copyright_33.txt.yml @@ -6,8 +6,3 @@ copyrights: - Copyright 2019 authors: - Pine -expected_failures: - - holders - - copyrights - - authors - diff --git a/tests/cluecode/data/ics/chromium-base-third_party-nspr/LICENSE.yml b/tests/cluecode/data/ics/chromium-base-third_party-nspr/LICENSE.yml index b3d225d907c..de8c619a632 100644 --- a/tests/cluecode/data/ics/chromium-base-third_party-nspr/LICENSE.yml +++ b/tests/cluecode/data/ics/chromium-base-third_party-nspr/LICENSE.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-2000 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/ics/chromium-base-third_party-nspr/prtime.cc.yml b/tests/cluecode/data/ics/chromium-base-third_party-nspr/prtime.cc.yml index 2c4ce48c01c..848ac9577f9 100644 --- a/tests/cluecode/data/ics/chromium-base-third_party-nspr/prtime.cc.yml +++ b/tests/cluecode/data/ics/chromium-base-third_party-nspr/prtime.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2011 Google Inc - - Copyright (c) 1998-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-2000 the Initial Developer holders: - Google Inc - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-download/download_extensions.cc.yml b/tests/cluecode/data/ics/chromium-chrome-browser-download/download_extensions.cc.yml index abbe14f28f3..d94be1c7000 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-download/download_extensions.cc.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-download/download_extensions.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2010 The Chromium Authors - - Copyright (c) 1998-1999 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock.cc.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock.cc.yml index 22d1634ac86..1cda1a98014 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock.cc.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2010 The Chromium Authors - - Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_posix.cc.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_posix.cc.yml index 610b7ec5c76..df80ef9e717 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_posix.cc.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_posix.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2009 The Chromium Authors - - Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_win.cc.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_win.cc.yml index 3f35c23fdd3..6413aad5c59 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_win.cc.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/firefox_profile_lock_win.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2008 The Chromium Authors - - Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/mork_reader.cc.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/mork_reader.cc.yml index f6ec8ac1ea0..4e3f73342a6 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/mork_reader.cc.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/mork_reader.cc.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2006 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2006 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor.cc.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor.cc.yml index e05f378fa21..8a20feeb922 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor.cc.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2011 The Chromium Authors - - Copyright (c) 1994-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1994-2000 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_mac.h.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_mac.h.yml index e2818ca0984..c611f6a41e4 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_mac.h.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_mac.h.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2010 The Chromium Authors - - Copyright (c) 1994-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1994-2000 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_win.h.yml b/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_win.h.yml index a2d8894c111..be6529516ac 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_win.h.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-importer/nss_decryptor_win.h.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2009 The Chromium Authors - - Copyright (c) 1994-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1994-2000 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml b/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml index 87aee8afbd5..abbfc8961d6 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml @@ -5,14 +5,14 @@ what: copyrights: - Copyright (c) 1991, 2000, 2001 by Lucent Technologies - Copyright (c) 2008-2009, Google Inc. - - Copyright (c) 1998-2000 the Initial Developer - - Copyright (c) 1994-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1994-2000 the Initial Developer - (c) Copyright IBM Corporation. 2006, 2006 - Copyright (c) 2006, Google Inc. - Copyright (c) 2000-2008 Julian Seward - Copyright (c) 2007 Red Hat, inc - Copyright 2003-2005 Colin Percival - - Copyright (c) 2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2000 the Initial Developer - Copyright 1993 by OpenVision Technologies, Inc. - Copyright 2007 Google Inc. - Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Alexander @@ -45,7 +45,7 @@ copyrights: - Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 - Copyright 2000, 2001, 2002, 2003 Nara Institute of Science and Technology - - Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer - Copyright (c) 2006-2008 Jason Evans jasone@FreeBSD.org - Copyright (c) International Business Machines Corp., 2002,2007 - Copyright 2000-2007 Niels Provos provos@citi.umich.edu @@ -74,8 +74,8 @@ copyrights: - Copyright 2008 MolokoCacao - Copyright (c) 2004-2009 Sergey Lyubka - Portions Copyright (c) 2009 Gilbert Wellisch - - Copyright (c) 2002 the Initial Developer - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer - Copyright (c) 2004-2009 by Mulle Kybernetik - Copyright (c) 2008 The Khronos Group Inc. - Copyright (c) 1998-2008 The OpenSSL Project diff --git a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml index 1361da41279..1775a79fff7 100644 --- a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml +++ b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright 2010, John Resig - - Copyright 2010, The Dojo Foundation + - http://sizzlejs.com Copyright 2010, The Dojo Foundation holders: - John Resig - The Dojo Foundation diff --git a/tests/cluecode/data/ics/chromium-crypto-third_party-nss/blapi.h.yml b/tests/cluecode/data/ics/chromium-crypto-third_party-nss/blapi.h.yml index 2f3ee72d8e0..36bfc34d0af 100644 --- a/tests/cluecode/data/ics/chromium-crypto-third_party-nss/blapi.h.yml +++ b/tests/cluecode/data/ics/chromium-crypto-third_party-nss/blapi.h.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1994-2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1994-2000 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/ics/chromium-crypto-third_party-nss/sha256.h.yml b/tests/cluecode/data/ics/chromium-crypto-third_party-nss/sha256.h.yml index a5285cdd196..50d775dbc73 100644 --- a/tests/cluecode/data/ics/chromium-crypto-third_party-nss/sha256.h.yml +++ b/tests/cluecode/data/ics/chromium-crypto-third_party-nss/sha256.h.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2002 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2002 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/ics/chromium-googleurl-src/url_parse.cc.yml b/tests/cluecode/data/ics/chromium-googleurl-src/url_parse.cc.yml index ced951abe21..e8f81cb6bd5 100644 --- a/tests/cluecode/data/ics/chromium-googleurl-src/url_parse.cc.yml +++ b/tests/cluecode/data/ics/chromium-googleurl-src/url_parse.cc.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/ics/chromium-googleurl/LICENSE.txt.yml b/tests/cluecode/data/ics/chromium-googleurl/LICENSE.txt.yml index 7c6c0cc1ae1..a5de130fa9e 100644 --- a/tests/cluecode/data/ics/chromium-googleurl/LICENSE.txt.yml +++ b/tests/cluecode/data/ics/chromium-googleurl/LICENSE.txt.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright 2007, Google Inc. - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer holders: - Google Inc. - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-net-base/cookie_monster.cc.yml b/tests/cluecode/data/ics/chromium-net-base/cookie_monster.cc.yml index d9da4970c77..7d6dd46a3db 100644 --- a/tests/cluecode/data/ics/chromium-net-base/cookie_monster.cc.yml +++ b/tests/cluecode/data/ics/chromium-net-base/cookie_monster.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2011 The Chromium Authors - - Copyright (c) 2003 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2003 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-net-base/effective_tld_names.dat.yml b/tests/cluecode/data/ics/chromium-net-base/effective_tld_names.dat.yml index bbba9e1c3ee..bec4c936fbb 100644 --- a/tests/cluecode/data/ics/chromium-net-base/effective_tld_names.dat.yml +++ b/tests/cluecode/data/ics/chromium-net-base/effective_tld_names.dat.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2007 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2007 the Initial Developer holders: - the Initial Developer holders_summary: diff --git a/tests/cluecode/data/ics/chromium-net-http/http_chunked_decoder.cc.yml b/tests/cluecode/data/ics/chromium-net-http/http_chunked_decoder.cc.yml index 473fab259d1..4d1208e382e 100644 --- a/tests/cluecode/data/ics/chromium-net-http/http_chunked_decoder.cc.yml +++ b/tests/cluecode/data/ics/chromium-net-http/http_chunked_decoder.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2010 The Chromium Authors - - Copyright (c) 2001 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2001 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-net-socket/ssl_client_socket_nss.cc.yml b/tests/cluecode/data/ics/chromium-net-socket/ssl_client_socket_nss.cc.yml index 4c969a901bb..81b87a39245 100644 --- a/tests/cluecode/data/ics/chromium-net-socket/ssl_client_socket_nss.cc.yml +++ b/tests/cluecode/data/ics/chromium-net-socket/ssl_client_socket_nss.cc.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2011 The Chromium Authors - - Copyright (c) 2000 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2000 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-webkit-glue-resources/README.txt.yml b/tests/cluecode/data/ics/chromium-webkit-glue-resources/README.txt.yml index 86cf20308af..d58ab1afcd4 100644 --- a/tests/cluecode/data/ics/chromium-webkit-glue-resources/README.txt.yml +++ b/tests/cluecode/data/ics/chromium-webkit-glue-resources/README.txt.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer - Copyright (c) 2005 Apple Computer, Inc. holders: - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-webkit-glue/multipart_response_delegate.h.yml b/tests/cluecode/data/ics/chromium-webkit-glue/multipart_response_delegate.h.yml index 3f76ceb4c0b..8bdf1412e92 100644 --- a/tests/cluecode/data/ics/chromium-webkit-glue/multipart_response_delegate.h.yml +++ b/tests/cluecode/data/ics/chromium-webkit-glue/multipart_response_delegate.h.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2006-2009 The Chromium Authors - - Copyright (c) 1998 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 1998 the Initial Developer holders: - The Chromium Authors - the Initial Developer diff --git a/tests/cluecode/data/ics/chromium-webkit-glue/webkit_strings.grd.yml b/tests/cluecode/data/ics/chromium-webkit-glue/webkit_strings.grd.yml index a1613552e70..7d6662f12a3 100644 --- a/tests/cluecode/data/ics/chromium-webkit-glue/webkit_strings.grd.yml +++ b/tests/cluecode/data/ics/chromium-webkit-glue/webkit_strings.grd.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2007 Apple Inc. - - Copyright (c) 2001 the Initial Developer + - Portions created by the Initial Developer are Copyright (c) 2001 the Initial Developer holders: - Apple Inc. - the Initial Developer diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml index 91ec24e7471..094660aafdc 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml @@ -18,5 +18,3 @@ holders_summary: - value: Michel Fortin count: 2 notes: we do not want a trailing http -expected_failures: - - copyrights diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml index 6dc20b6be7d..8f932fd5455 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml @@ -17,5 +17,3 @@ holders_summary: count: 2 - value: Michel Fortin count: 2 -expected_failures: - - copyrights diff --git a/tests/cluecode/data/ics/speex/NOTICE.yml b/tests/cluecode/data/ics/speex/NOTICE.yml index ef50286a5f9..678f7d02f39 100644 --- a/tests/cluecode/data/ics/speex/NOTICE.yml +++ b/tests/cluecode/data/ics/speex/NOTICE.yml @@ -2,6 +2,7 @@ what: - copyrights - holders - holders_summary + - authors copyrights: - Copyright (c) 2002-2008 Jean-Marc Valin - Copyright (c) 2002 Jean-Marc Valin & David Rowe @@ -33,6 +34,8 @@ holders: - Jean-Marc Valin - Jyri Sarha, Texas Instruments - Jutta Degener and Carsten Bormann, Technische Universitaet Berlin +authors: + - Jean-Marc Valin holders_summary: - value: Epic Games count: 3 diff --git a/tests/licensedcode/test_detection_validate.py b/tests/licensedcode/test_detection_validate.py index 4fdc581f5a2..0d0c341c3b7 100644 --- a/tests/licensedcode/test_detection_validate.py +++ b/tests/licensedcode/test_detection_validate.py @@ -79,10 +79,7 @@ def check_rule_or_license_can_be_self_detected_exactly(rule): expected = [rule.identifier, '100'] results = flatten((m.rule.identifier, str(int(m.coverage()))) for m in matches) - try: - assert results == expected - except: - + if results != expected: from licensedcode.tracing import get_texts rule_file = rule.rule_file() # On failure, we compare again to get additional failure details such as @@ -145,9 +142,7 @@ def check_ignorable_clues(licensish, regen=REGEN_TEST_FIXTURES, verbose=False): print('expected') pprint(expected) - try: - assert result == expected - except: + if result != expected: # On failure, we compare again to get additional failure details such as # a clickable text_file path. diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml index 8018b0ddd52..e8d13f255e5 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc-bin/copyright-detailed.expected.yml @@ -803,7 +803,7 @@ copyright: | copyright Eric Young Copyright (c) 1992 Eric Young Collected copyright Simon Josefsson - copyright The Internet Society, Tom Tromey and Red Hat, Inc. + portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. Copyright (c) 2002, 2003, 2004, 2011 Simon Josefsson Copyright (c) 1999, 2000 Tom Tromey Copyright 2000 Red Hat, Inc. diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml index 8018b0ddd52..e8d13f255e5 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libc6/copyright-detailed.expected.yml @@ -803,7 +803,7 @@ copyright: | copyright Eric Young Copyright (c) 1992 Eric Young Collected copyright Simon Josefsson - copyright The Internet Society, Tom Tromey and Red Hat, Inc. + portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. Copyright (c) 2002, 2003, 2004, 2011 Simon Josefsson Copyright (c) 1999, 2000 Tom Tromey Copyright 2000 Red Hat, Inc. diff --git a/tests/textcode/data/markup/java.jsp-expected.json b/tests/textcode/data/markup/java.jsp-expected.json index 31606fa73d4..21de6517dad 100644 --- a/tests/textcode/data/markup/java.jsp-expected.json +++ b/tests/textcode/data/markup/java.jsp-expected.json @@ -1,9 +1,9 @@ [ " version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n", - " <%@page session=\"false\" contentType=\"text/html; charset=ISO-8859-1\" %>\r\n", - " <%@page import=\"clime.messadmin.model.IServerInfo\" %>\r\n", - " <%@taglib prefix=\"core\" uri=\"messadmin-core\" %>\r\n", - " <%@taglib prefix=\"format\" uri=\"messadmin-fmt\" %>\r\n", + "<%@page session=\"false\" contentType=\"text/html; charset=ISO-8859-1\" %>\r\n", + "<%@page import=\"clime.messadmin.model.IServerInfo\" %>\r\n", + "<%@taglib prefix=\"core\" uri=\"messadmin-core\" %>\r\n", + "<%@taglib prefix=\"format\" uri=\"messadmin-fmt\" %>\r\n", " HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"--%>\r\n", " HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"--%>\r\n", " html \r\n", @@ -22,16 +22,16 @@ " or use directly ${pageContext.request.requestURI} --%>\r\n", " String submitUrl = request.getContextPath() + request.getServletPath(); /* Can use +request.getServletPath() because this JSP is include()'ed */ %>\r\n", " \r\n", - " http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1 \"/> \r\n", - "\t http-equiv=\"pragma\" content=\"no-cache \"/> HTTP 1.0 -->\r\n", - "\t http-equiv=\"cache-control\" content=\"no-cache,must-revalidate \"/> HTTP 1.1 -->\r\n", - "\t http-equiv=\"expires\" content=\"0 \"/> 0 is an invalid value and should be treated as 'now' -->\r\n", - "\t http-equiv=\"content-language\" content=\"en \"/> fr-FR --%>\r\n", - "\t name=\"author\" content=\"Cedrik LIME \"/> \r\n", - "\t name=\"copyright\" content=\"copyright 2005-2006 Cedrik LIME \"/> \r\n", - "\t name=\"robots\" content=\"noindex,nofollow,noarchive \"/> \r\n", + " http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1 \r\n", + "\t http-equiv=\"pragma\" content=\"no-cache HTTP 1.0 -->\r\n", + "\t http-equiv=\"cache-control\" content=\"no-cache,must-revalidate HTTP 1.1 -->\r\n", + "\t http-equiv=\"expires\" content=\"0 0 is an invalid value and should be treated as 'now' -->\r\n", + "\t http-equiv=\"content-language\" content=\"en fr-FR --%>\r\n", + "\t name=\"author\" content=\"Cedrik LIME \r\n", + "\t name=\"copyright\" content=\"copyright 2005-2006 Cedrik LIME \r\n", + "\t name=\"robots\" content=\"noindex,nofollow,noarchive \r\n", "\t Server System Informations \r\n", - "\t rel=\"stylesheet\" type=\"text/css\" =\" MessAdmin.css \"/> \r\n", + "\t rel=\"stylesheet\" type=\"text/css\" =\" MessAdmin.css \r\n", "\t type=\"text/css\">\r\n", "\t \r\n", "\t type=\"text/javascript\" src=\" js/getElementsBySelector.js\"> \r\n", @@ -64,7 +64,7 @@ " \r\n", "------------------------>\r\n", "\r\n", - " \r\n", + "\r\n", " \r\n", @@ -85,7 +85,7 @@ " \r\n", "\r\n", " \r\n", - "\t Server Information \r\n", + "\tServer Information\r\n", " style=\"text-align: left;\" border=\"0\">\r\n", "\t \r\n", "\t\t Server name \r\n", @@ -95,69 +95,69 @@ "\t \r\n", "\t \r\n", "\t\t Temp file directory \r\n", - "\t\t value=' serverInfos.getSystemProperties().get(\"java.io.tmpdir\") %> '/> \r\n", + "\t\t value=' serverInfos.getSystemProperties().get(\"java.io.tmpdir\") %> \r\n", "\t\t Running as \r\n", - "\t\t title='Home directory: serverInfos.getSystemProperties().get(\"user.home\") %>'> value=' serverInfos.getSystemProperties().get(\"user.name\") %> '/> \r\n", + "\t\t title='Home directory: serverInfos.getSystemProperties().get(\"user.home\") %>'> value=' serverInfos.getSystemProperties().get(\"user.name\") %> \r\n", "\t \r\n", "\t \r\n", "\t\t Startup date \r\n", - "\t\t value=\" serverInfos.getStartupTime() %>\" type=\"both\" pattern=\"yyyy-MM-dd HH:mm:ss \"/> \r\n", + "\t\t value=\" serverInfos.getStartupTime() %>\" type=\"both\" pattern=\"yyyy-MM-dd HH:mm:ss \r\n", "\t\t colspan=\"2\"> \r\n", "\t \r\n", " \r\n", " \r\n", "\r\n", " \r\n", - "\t CPU and Memory \r\n", + "\tCPU and Memory\r\n", " style=\"text-align: left;\" border=\"0\">\r\n", " test=\" serverInfos.getCpuCount() >= 0 %>\">\r\n", "\t \r\n", "\t\t title=\"maximum number of processors available to the Java virtual machine\">Number of CPUs \r\n", - "\t\t align=\"center\"> value=\" serverInfos.getCpuCount() %>\" type=\"number \"/> \r\n", + "\t\t align=\"center\"> value=\" serverInfos.getCpuCount() %>\" type=\"number \r\n", "\t \r\n", " \r\n", "\t \r\n", "\t\t title=\"amount of free memory in the system\">Free Memory \r\n", - "\t\t class=\"number\"> value=\" serverInfos.getFreeMemory() %>\" type=\"bytes \"/> \r\n", + "\t\t class=\"number\"> value=\" serverInfos.getFreeMemory() %>\" type=\"bytes \r\n", "\t \r\n", "\t \r\n", "\t\t title=\"total amount of memory in the Java Virtual Machine\">Total Memory \r\n", - "\t\t class=\"number\"> value=\" serverInfos.getTotalMemory() %>\" type=\"bytes \"/> \r\n", + "\t\t class=\"number\"> value=\" serverInfos.getTotalMemory() %>\" type=\"bytes \r\n", "\t \r\n", " test=\" serverInfos.getMaxMemory() >= 0 %>\">\r\n", "\t \r\n", "\t\t title=\"maximum amount of memory that the Java virtual machine will attempt to use\">Max Memory \r\n", - "\t\t class=\"number\"> value=\" serverInfos.getMaxMemory() %>\" type=\"bytes \"/> \r\n", + "\t\t class=\"number\"> value=\" serverInfos.getMaxMemory() %>\" type=\"bytes \r\n", "\t \r\n", " \r\n", " \r\n", " \r\n", "\r\n", " \r\n", - "\t VM Info \r\n", + "\tVM Info\r\n", " extracted properties from System.getProperties() (see JavaDoc) -->\r\n", " style=\"text-align: left;\" border=\"0\">\r\n", "\t VM Info \r\n", "\t \r\n", "\t\t Java VM \r\n", "\t\t \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.vendor\") %> '/> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.name\") %> '/> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.version\") %> '/> \r\n", + "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.vendor\") %> \r\n", + "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.name\") %> \r\n", + "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.version\") %> \r\n", "\t\t \r\n", "\t \r\n", "\t \r\n", "\t\t Java RE \r\n", "\t\t \r\n", - "\t\t\t =\" serverInfos.getSystemProperties().get(\"java.vendor.url\") %>\"> value=' serverInfos.getSystemProperties().get(\"java.vendor\") %> '/> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.version\") %> '/> @ value=' serverInfos.getSystemProperties().get(\"java.home\") %> '/> \r\n", + "\t\t\t =\" serverInfos.getSystemProperties().get(\"java.vendor.url\") %>\"> value=' serverInfos.getSystemProperties().get(\"java.vendor\") %> \r\n", + "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.version\") %> @ value=' serverInfos.getSystemProperties().get(\"java.home\") %> \r\n", "\t\t \r\n", "\t \r\n", "\t \r\n", "\t\t Platform \r\n", "\t\t \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"os.name\") %> '/> / value=' serverInfos.getSystemProperties().get(\"os.arch\") %> '/> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"os.version\") %> '/> \r\n", + "\t\t\t value=' serverInfos.getSystemProperties().get(\"os.name\") %> / value=' serverInfos.getSystemProperties().get(\"os.arch\") %> \r\n", + "\t\t\t value=' serverInfos.getSystemProperties().get(\"os.version\") %> \r\n", "\t\t \r\n", "\t \r\n", " \r\n", @@ -165,20 +165,20 @@ "\r\n", " style=\"text-align: center;\"> type=\"button\" onclick=\"window.location.reload()\">Refresh \r\n", "\r\n", - " class=\"error\"> value=' request.getAttribute(\"error\") %> '/> \r\n", - " class=\"message\"> value=' request.getAttribute(\"message\") %> '/> \r\n", + " class=\"error\"> value=' request.getAttribute(\"error\") %> \r\n", + " class=\"message\"> value=' request.getAttribute(\"message\") %> \r\n", "\r\n", " id=\"extraServerAttributes\">\r\n", " items=\" serverInfos.getServerSpecificData() %>\" var=\"serverSpecificData\" varStatus=\"status\">\r\n", " java.util.Map.Entry serverSpecificData = (java.util.Map.Entry) pageContext.getAttribute(\"serverSpecificData\"); %>\r\n", "\t \r\n", - "\t\t serverSpecificData.getKey() %> \r\n", + "\t\t serverSpecificData.getKey() %>\r\n", "\t\t serverSpecificData.getValue() %>\r\n", "\t \r\n", " \r\n", " \r\n", "\r\n", - " \r\n", + "Copyright © 2006 Trolltech""", - ' width="30%">Copyright © 2006 ="trolltech.html">Trolltech ', + ' width="30%">Copyright © 2006 ="trolltech.html">Trolltech ', ), ( "

SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1

", From 412358ad3e15cacd08c6b4c053b0b96e6ae86ab9 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 22 Jun 2024 01:02:22 +0200 Subject: [PATCH 25/30] Refine copyright detection Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 7 ------- tests/cluecode/data/authors/author_russ_c-c.c.yml | 2 -- tests/cluecode/data/copyrights/name_before_c-c.c.yml | 4 ---- .../jquery-1.4.2.min.js.yml | 2 +- tests/cluecode/test_copyrights_fosso.py | 1 - 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 69e52d4804b..040e9863a34 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2014,9 +2014,6 @@ def build_detection_from_node( # slash dates as in 08/95 (r'^(0?[1-9]|1[012])/[6-9][0-9][\.,]?$', 'YR'), - # ISO Dates: YYYY-MM-DD - (fr'^{_YEAR}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$', 'YR'), - # weird year (r'today.year', 'YR'), (r'^\$?LastChangedDate\$?$', 'YR'), @@ -3105,10 +3102,6 @@ def build_detection_from_node( # 1995-2003 by Internet Software Consortium COPYRIGHT: { } #1615 - # Russ Dill 2001-2003 - # Rewrited by Vladimir Oleynik (C) 2003 - COPYRIGHT: { } #22793.5 - # portions copyright The Internet Society, Tom Tromey and Red Hat, Inc. COPYRIGHT: { } #157998 diff --git a/tests/cluecode/data/authors/author_russ_c-c.c.yml b/tests/cluecode/data/authors/author_russ_c-c.c.yml index 0a237a264df..5e8be657cf4 100644 --- a/tests/cluecode/data/authors/author_russ_c-c.c.yml +++ b/tests/cluecode/data/authors/author_russ_c-c.c.yml @@ -4,9 +4,7 @@ what: - copyrights - holders copyrights: - - Russ Dill 2001-2003 - Vladimir Oleynik (c) 2003 holders: - - Russ Dill - Vladimir Oleynik notes: these are detected as copyrights, not authors diff --git a/tests/cluecode/data/copyrights/name_before_c-c.c.yml b/tests/cluecode/data/copyrights/name_before_c-c.c.yml index 03057ab84ae..99ec69bea30 100644 --- a/tests/cluecode/data/copyrights/name_before_c-c.c.yml +++ b/tests/cluecode/data/copyrights/name_before_c-c.c.yml @@ -3,13 +3,9 @@ what: - holders - holders_summary copyrights: - - Russ Dill 2001-2003 - Vladimir Oleynik (c) 2003 holders: - - Russ Dill - Vladimir Oleynik holders_summary: - - value: Russ Dill - count: 1 - value: Vladimir Oleynik count: 1 diff --git a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml index 1775a79fff7..1361da41279 100644 --- a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml +++ b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-benchmark-jquery/jquery-1.4.2.min.js.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright 2010, John Resig - - http://sizzlejs.com Copyright 2010, The Dojo Foundation + - Copyright 2010, The Dojo Foundation holders: - John Resig - The Dojo Foundation diff --git a/tests/cluecode/test_copyrights_fosso.py b/tests/cluecode/test_copyrights_fosso.py index 8920df7ab31..1b5f6e52ba4 100644 --- a/tests/cluecode/test_copyrights_fosso.py +++ b/tests/cluecode/test_copyrights_fosso.py @@ -32,7 +32,6 @@ 'test_fossology_copyright_testdata19', 'test_fossology_copyright_testdata78', 'test_fossology_copyright_testdata86', - 'test_fossology_copyright_testdata93', ]) From 87d55592c8c6ab44b7df343f7a80ec9d214a320f Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 22 Jun 2024 11:48:04 +0200 Subject: [PATCH 26/30] Use latest commoncode Signed-off-by: Philippe Ombredanne --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 080442210b5..fb80bf9b596 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ chardet==5.0.0 charset-normalizer==2.1.0 click==8.1.7 colorama==0.4.5 -commoncode==31.0.3 +commoncode==31.2.1 construct==2.10.68 container-inspector==31.1.0 cryptography==42.0.5 From 35366f037c2436d7213985e3ff4f73101f1faac0 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 22 Jun 2024 11:48:59 +0200 Subject: [PATCH 27/30] Enable generation of copyright test data files Signed-off-by: Philippe Ombredanne --- src/licensedcode/data/licenses/mtll.LICENSE | 3 ++ .../data/licenses/nero-eula.LICENSE | 5 +- tests/cluecode/cluecode_test_utils.py | 51 ++++++++++++++++--- tests/cluecode/test_copyrights.py | 4 +- 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/licensedcode/data/licenses/mtll.LICENSE b/src/licensedcode/data/licenses/mtll.LICENSE index 3fa49ad205d..71009a1d9a1 100644 --- a/src/licensedcode/data/licenses/mtll.LICENSE +++ b/src/licensedcode/data/licenses/mtll.LICENSE @@ -10,6 +10,9 @@ notes: | derived from the Apache Software License v1.1, but it is modified in several ways. It is Free, but GPL-incompatible. spdx_license_key: MTLL +ignorable_authors: + - at the University of Notre Dame, the Pervasive Technology Labs at Indiana University, and + Dresden University of Technology --- Software License for MTL diff --git a/src/licensedcode/data/licenses/nero-eula.LICENSE b/src/licensedcode/data/licenses/nero-eula.LICENSE index de1c5565fc3..ef830b563b4 100644 --- a/src/licensedcode/data/licenses/nero-eula.LICENSE +++ b/src/licensedcode/data/licenses/nero-eula.LICENSE @@ -15,9 +15,9 @@ ignorable_copyrights: - Copyright (c) 1991-2, RSA Data Security, Inc. - Copyright (c) 1992-1999 Dolby Laboratories, Inc. - Copyright (c) 1996-2012 Nero AG and its licensors + - Copyright (c) 1999-2002. Microsoft Corporation - Copyright (c) 2008 Microsoft Corporation - Copyright 2011 Dolby Laboratories - - Media Technologies. Copyright (c) 1999-2002. Microsoft Corporation - copyright (c) 1998-2005 The OpenSSL Project - copyright (c) 2000-2008 Gracenote - copyright (c) 2000-2008 Gracenote. Gracenote Software @@ -33,7 +33,6 @@ ignorable_holders: - Dr Brian Gladman, Worcester, UK. - Gracenote - Gracenote. Gracenote Software - - Media Technologies. Microsoft Corporation - Microsoft Corporation - Nero AG and its licensors - Nero AG. @@ -402,4 +401,4 @@ Other product and brand names may be trademarks of their respective owners and d www.nero.com If you have any questions concerning this Agreement contact us via legal@nero.com. -© 2012 Nero AG. All rights reserved. \ No newline at end of file +© 2012 Nero AG. All rights reserved. diff --git a/tests/cluecode/cluecode_test_utils.py b/tests/cluecode/cluecode_test_utils.py index 784a4f757e3..f39eaf1cdad 100644 --- a/tests/cluecode/cluecode_test_utils.py +++ b/tests/cluecode/cluecode_test_utils.py @@ -8,6 +8,7 @@ # import io +import os from itertools import chain from os import path @@ -23,7 +24,6 @@ from cluecode.copyrights import Detection from scancode_config import REGEN_TEST_FIXTURES - """ Data-driven Copyright test utilities. """ @@ -129,19 +129,56 @@ def dump(self, check_exists=False): def load_copyright_tests(test_dir=test_env.test_data_dir, generate_missing=False): """ Yield an iterable of CopyrightTest loaded from test data files in `test_dir`. + If `generate_missing` is True, generate missing YAML data files with a default test template. """ - test_dirs = (path.join(test_dir, td) for td in - ('copyrights', 'ics', 'holders', 'authors', 'years', 'generated')) + test_dirs = [ + path.join(test_dir, td) + for td in + ('copyrights', 'ics', 'holders', 'authors', 'years', 'generated') + ] + + if generate_missing: + for td in test_dirs: + create_missing_test_data_files(test_dir=td) - all_test_files = chain.from_iterable( - get_test_file_pairs(td, generate_missing=generate_missing) - for td in test_dirs - ) + all_test_files = chain.from_iterable(get_test_file_pairs(td) for td in test_dirs) for data_file, test_file in all_test_files: yield CopyrightTest(data_file, test_file) +empty_data_file = """what: + - copyrights + - holders + - holders_summary + - authors +""" + + +def create_missing_test_data_files(test_dir): + """ + Create missing copyright test data files in a `test_dir` directory. + + Each test consist of a pair of files: + - a test file. + - a data file with the same name as a test file and a '.yml' extension added. + """ + for top, _, files in os.walk(test_dir): + for tfile in files: + if tfile.endswith('~'): + continue + file_path = path.abspath(path.join(top, tfile)) + + if tfile.endswith('.yml'): + data_file_path = file_path + else: + data_file_path = file_path + '.yml' + + if not path.exists(data_file_path): + with open(data_file_path, "w") as tfo: + tfo.write(empty_data_file) + + def as_sorted_mapping(counter): """ Return a list of ordered mapping of {value:val, count:cnt} built from a diff --git a/tests/cluecode/test_copyrights.py b/tests/cluecode/test_copyrights.py index 3db0b9077fe..69444c46d3f 100644 --- a/tests/cluecode/test_copyrights.py +++ b/tests/cluecode/test_copyrights.py @@ -31,8 +31,8 @@ class TestCopyrightDataDriven(FileBasedTesting): pass -build_tests(copyright_tests=load_copyright_tests( - generate_missing=REGEN_TEST_FIXTURES), +build_tests( + copyright_tests=load_copyright_tests(generate_missing=REGEN_TEST_FIXTURES), clazz=TestCopyrightDataDriven, regen=REGEN_TEST_FIXTURES, ) From f07eaee6f386735c92abf8e07a3c28e95d00625f Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 26 Jun 2024 10:08:40 +0200 Subject: [PATCH 28/30] Do not regen demarkup tests Signed-off-by: Philippe Ombredanne Co-authored-by: Ayan Sinha Mahapatra --- tests/textcode/test_markup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textcode/test_markup.py b/tests/textcode/test_markup.py index df9dcf5acef..3d702060a93 100644 --- a/tests/textcode/test_markup.py +++ b/tests/textcode/test_markup.py @@ -24,7 +24,7 @@ def test_jsp_is_markup(self): test_file = self.get_test_loc(u'markup/java.jsp') assert markup.is_markup(test_file) - def test_jsp_demarkup(self, regen=True): + def test_jsp_demarkup(self, regen=False): test_file = self.get_test_loc(u'markup/java.jsp') result = list(markup.demarkup(test_file)) expected_loc = self.get_test_loc(u'markup/java.jsp-expected.json') From e4f626708a3d952220ce465e32f4a327129e9702 Mon Sep 17 00:00:00 2001 From: Tushar Goel <34160672+TG1999@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:14:09 +0530 Subject: [PATCH 29/30] Add handler for packages.lock.json in nuget (#3825) Add handler for packages.lock.json in nuget Adds support for parsing resolved packages and dependency relationships from nuget lockfile `packages.lock.json`. Reference: https://github.com/nexB/scancode.io/issues/1263 Signed-off-by: Tushar Goel Signed-off-by: Ayan Sinha Mahapatra Co-authored-by: Ayan Sinha Mahapatra --- CHANGELOG.rst | 4 + src/packagedcode/__init__.py | 1 + src/packagedcode/nuget.py | 86 + .../data/nuget/packages.lock.json | 341 ++ .../data/nuget/packages.lock.json.expected | 3068 +++++++++++++++++ tests/packagedcode/data/plugin/help.txt | 7 + tests/packagedcode/test_nuget.py | 10 + 7 files changed, 3517 insertions(+) create mode 100644 tests/packagedcode/data/nuget/packages.lock.json create mode 100644 tests/packagedcode/data/nuget/packages.lock.json.expected diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 698cda22e0c..f7ce8704a0f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -34,6 +34,10 @@ v33.0.0 (next next, roadmap) of these in other summary plugins. See https://github.com/nexB/scancode-toolkit/issues/1745 +- Add support for parsing resolved packages and dependency relationships + from nuget lockfile `packages.lock.json`. + See https://github.com/nexB/scancode-toolkit/pull/3825 + v32.2.0 - 2024-06-19 ---------------------- diff --git a/src/packagedcode/__init__.py b/src/packagedcode/__init__.py index e9e34cba04d..098d4ceeba4 100644 --- a/src/packagedcode/__init__.py +++ b/src/packagedcode/__init__.py @@ -156,6 +156,7 @@ nuget.NugetNupkgHandler, nuget.NugetNuspecHandler, + nuget.NugetPackagesLockHandler, opam.OpamFileHandler, diff --git a/src/packagedcode/nuget.py b/src/packagedcode/nuget.py index de584038d48..c399b5d418d 100644 --- a/src/packagedcode/nuget.py +++ b/src/packagedcode/nuget.py @@ -7,6 +7,7 @@ # See https://aboutcode.org for more information about nexB OSS projects. # +import json import xmltodict from packageurl import PackageURL @@ -179,3 +180,88 @@ def parse(cls, location, package_only=False): ) yield models.PackageData.from_data(package_data, package_only) + +class NugetPackagesLockHandler(models.DatafileHandler): + datasource_id = 'nuget_packages_lock' + path_patterns = ('*packages.lock.json',) + default_package_type = 'nuget' + description = 'NuGet packages.lock.json file' + documentation_url = 'https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-restore' + + @classmethod + def get_dependencies(cls, package_info, scope): + dependencies = [] + dependencies_mapping = package_info.get("dependencies") or {} + for name, version in dependencies_mapping.items(): + dependency = models.DependentPackage( + purl=str(PackageURL(type='nuget', name=name, version=version)), + extracted_requirement=version, + is_resolved=True, + scope=scope, + is_optional=False, + is_runtime=True, + is_direct=True, + ) + dependencies.append(dependency) + return dependencies + + @classmethod + def parse(cls, location, package_only=False): + with open(location) as loc: + parsed = json.load(loc) + + if not parsed: + return + + top_dependencies = [] + for target_framework, packages in parsed.get('dependencies', {}).items(): + extra_data = dict( + target_framework=target_framework, + ) + for package_name, package_info in packages.items(): + dependencies = cls.get_dependencies(package_info=package_info, scope=target_framework) + resolved_package_mapping = dict( + datasource_id=cls.datasource_id, + type=cls.default_package_type, + primary_language=cls.default_primary_language, + name=package_name, + dependencies=[ + dep.to_dict() for dep in dependencies + ], + is_virtual=True, + version=package_info.get('resolved'), + ) + resolved_package = models.PackageData.from_data(resolved_package_mapping) + package_type = package_info.get('type') + if package_type == "Direct": + is_direct = True + elif package_type == "Transitive": + is_direct = False + else: + raise Exception(f"Unknown package type: {package_type} for package {package_name} in {location}") + + + version = package_info.get('resolved') + requested = package_info.get('requested') + dependency = models.DependentPackage( + purl=str(PackageURL(type='nuget', name=package_name, version=version)), + extracted_requirement=requested or version, + is_resolved=True, + resolved_package=resolved_package.to_dict(), + # We use the target framework as scope since there is no concept of scope in .NET + # and we may have different resolutions for different target frameworks + scope=target_framework, + is_optional=False, + is_runtime=True, + is_direct=is_direct, + ) + top_dependencies.append(dependency.to_dict()) + package_data = dict( + datasource_id=cls.datasource_id, + type=cls.default_package_type, + primary_language=cls.default_primary_language, + extra_data=extra_data, + dependencies=top_dependencies, + ) + yield models.PackageData.from_data(package_data, package_only) + diff --git a/tests/packagedcode/data/nuget/packages.lock.json b/tests/packagedcode/data/nuget/packages.lock.json new file mode 100644 index 00000000000..e5b2c894851 --- /dev/null +++ b/tests/packagedcode/data/nuget/packages.lock.json @@ -0,0 +1,341 @@ +{ + "version": 1, + "dependencies": { + "net6.0": { + "McMaster.Extensions.Hosting.CommandLine": { + "type": "Direct", + "requested": "[4.0.1, )", + "resolved": "4.0.1", + "contentHash": "pZJF/zeXT3OC+3GUNO9ZicpCO9I7wYLmj0E2qPR8CRA6iUs0kGu6SCkmraB1sITx4elcVjMLiZDGMsBVMqaPhg==", + "dependencies": { + "McMaster.Extensions.CommandLineUtils": "4.0.1", + "Microsoft.Extensions.Hosting.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0" + } + }, + "Microsoft.Extensions.Hosting": { + "type": "Direct", + "requested": "[6.0.1, )", + "resolved": "6.0.1", + "contentHash": "hbmizc9KPWOacLU8Z8YMaBG6KWdZFppczYV/KwnPGU/8xebWxQxdDeJmLOgg968prb7g2oQgnp6JVLX6lgby8g==", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.Binder": "6.0.0", + "Microsoft.Extensions.Configuration.CommandLine": "6.0.0", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "6.0.1", + "Microsoft.Extensions.Configuration.FileExtensions": "6.0.0", + "Microsoft.Extensions.Configuration.Json": "6.0.0", + "Microsoft.Extensions.Configuration.UserSecrets": "6.0.1", + "Microsoft.Extensions.DependencyInjection": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0", + "Microsoft.Extensions.FileProviders.Physical": "6.0.0", + "Microsoft.Extensions.Hosting.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Configuration": "6.0.0", + "Microsoft.Extensions.Logging.Console": "6.0.0", + "Microsoft.Extensions.Logging.Debug": "6.0.0", + "Microsoft.Extensions.Logging.EventLog": "6.0.0", + "Microsoft.Extensions.Logging.EventSource": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0" + } + }, + "Microsoft.Extensions.Options.DataAnnotations": { + "type": "Direct", + "requested": "[6.0.0, )", + "resolved": "6.0.0", + "contentHash": "Fvs4plZYQT/iF/JsYwP/pppQRvQC211enBjCoIu/355M+aunlzSyzN/n3wPibyY76794MFLkLVT47JCBc3porg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.ComponentModel.Annotations": "5.0.0" + } + }, + "McMaster.Extensions.CommandLineUtils": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "nqKyjpNB37t3xYYTkst8r5dU5Cxj3HWirR1H6U5iiSRrUJLBeJQHogHk/HsnDqVnq0+jrzSxYw8lJ02GsTRcrw==", + "dependencies": { + "System.ComponentModel.Annotations": "5.0.0" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "tq2wXyh3fL17EMF2bXgRhU7JrbO3on93MRKYxzz4JzzvuGSA1l0W3GI9/tl8EO89TH+KWEymP7bcFway6z9fXg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "qWzV9o+ZRWq+pGm+1dF+R7qTgTYoXvbyowRoBxQJGfqTpqDun2eteerjRQhq5PQ/14S+lqto3Ft4gYaRyl4rdQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "b3ErKzND8LIC7o08QAVlKfaEIYEvLJbtmVbFZVBRXeu9YkKfSSzLZfR1SUfQPBIy9mKLhEtJgGYImkcMNaKE0A==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.CommandLine": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "3nL1qCkZ1Oxx14ZTzgo4MmlO7tso7F+TtMZAY2jUAtTLyAcDp+EDjk3RqafoKiNaePyPvvlleEcBxh3b2Hzl1g==", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.EnvironmentVariables": { + "type": "Transitive", + "resolved": "6.0.1", + "contentHash": "pnyXV1LFOsYjGveuC07xp0YHIyGq7jRq5Ncb5zrrIieMLWVwgMyYxcOH0jTnBedDT4Gh1QinSqsjqzcieHk1og==", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.FileExtensions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "V4Dth2cYMZpw3HhGw9XUDIijpI6gN+22LDt0AhufIgOppCUfpWX4483OmN+dFXRJkJLc8Tv0Q8QK+1ingT2+KQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0", + "Microsoft.Extensions.FileProviders.Physical": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.Json": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "GJGery6QytCzS/BxJ96klgG9in3uH26KcUBbiVG/coNDXCRq6LGVVlUT4vXq34KPuM+R2av+LeYdX9h4IZOCUg==", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.FileExtensions": "6.0.0", + "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0", + "System.Text.Json": "6.0.0" + } + }, + "Microsoft.Extensions.Configuration.UserSecrets": { + "type": "Transitive", + "resolved": "6.0.1", + "contentHash": "Fy8yr4V6obi7ZxvKYI1i85jqtwMq8tqyxQVZpRSkgeA8enqy/KvBIMdcuNdznlxQMZa72mvbHqb7vbg4Pyx95w==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.Json": "6.0.0", + "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0", + "Microsoft.Extensions.FileProviders.Physical": "6.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "0pd4/fho0gC12rQswaGQxbU34jOS1TPS8lZPpkFCH68ppQjHNHYle9iRuHeev1LhrJ94YPvzcRd8UmIuFk23Qw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.FileProviders.Physical": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "QvkL7l0nM8udt3gfyu0Vw8bbCXblxaKOl7c2oBfgGy4LCURRaL9XWZX1FWJrQc43oMokVneVxH38iz+bY1sbhg==", + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0", + "Microsoft.Extensions.FileSystemGlobbing": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.FileSystemGlobbing": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "ip8jnL1aPiaPeKINCqaTEbvBFDmVx9dXQEBZ2HOBRXPD1eabGNqP/bKlsIcp7U2lGxiXd5xIhoFcmY8nM4Hdiw==" + }, + "Microsoft.Extensions.Hosting.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "GcT5l2CYXL6Sa27KCSh0TixsRfADUgth+ojQSD5EkzisZxmGFh7CwzkcYuGwvmXLjr27uWRNrJ2vuuEjMhU05Q==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.FileProviders.Abstractions": "6.0.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.Diagnostics.DiagnosticSource": "6.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" + }, + "Microsoft.Extensions.Logging.Configuration": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "ZDskjagmBAbv+K8rYW9VhjPplhbOE63xUD0DiuydZJwt15dRyoqicYklLd86zzeintUc7AptDkHn+YhhYkYo8A==", + "dependencies": { + "Microsoft.Extensions.Configuration": "6.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.Binder": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0" + } + }, + "Microsoft.Extensions.Logging.Console": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "gsqKzOEdsvq28QiXFxagmn1oRB9GeI5GgYCkoybZtQA0IUb7QPwf1WmN3AwJeNIsadTvIFQCiVK0OVIgKfOBGg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Configuration": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.Text.Json": "6.0.0" + } + }, + "Microsoft.Extensions.Logging.Debug": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "M9g/JixseSZATJE9tcMn9uzoD4+DbSglivFqVx8YkRJ7VVPmnvCEbOZ0AAaxsL1EKyI4cz07DXOOJExxNsUOHw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0" + } + }, + "Microsoft.Extensions.Logging.EventLog": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "rlo0RxlMd0WtLG3CHI0qOTp6fFn7MvQjlrCjucA31RqmiMFCZkF8CHNbe8O7tbBIyyoLGWB1he9CbaA5iyHthg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.Diagnostics.EventLog": "6.0.0" + } + }, + "Microsoft.Extensions.Logging.EventSource": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "BeDyyqt7nkm/nr+Gdk+L8n1tUT/u33VkbXAOesgYSNsxDM9hJ1NOBGoZfj9rCbeD2+9myElI6JOVVFmnzgeWQA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Json": "6.0.0" + } + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "bXWINbTn0vC0FYc9GaQTISbxhQLAMrvtbuvD9N6JelEaIS/Pr62wUCinrq5bf1WRBGczt1v4wDhxFtVFNcMdUQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", + "Microsoft.Extensions.Configuration.Binder": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "6.0.0" + } + } + } + } + } \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/packages.lock.json.expected b/tests/packagedcode/data/nuget/packages.lock.json.expected new file mode 100644 index 00000000000..e862238d1d2 --- /dev/null +++ b/tests/packagedcode/data/nuget/packages.lock.json.expected @@ -0,0 +1,3068 @@ +[ + { + "type": "nuget", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": { + "target_framework": "net6.0" + }, + "dependencies": [ + { + "purl": "pkg:nuget/McMaster.Extensions.Hosting.CommandLine@4.0.1", + "extracted_requirement": "[4.0.1, )", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "McMaster.Extensions.Hosting.CommandLine", + "version": "4.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/McMaster.Extensions.CommandLineUtils@4.0.1", + "extracted_requirement": "4.0.1", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Hosting.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/McMaster.Extensions.Hosting.CommandLine@4.0.1" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Hosting@6.0.1", + "extracted_requirement": "[6.0.1, )", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Hosting", + "version": "6.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Binder@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.CommandLine@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.EnvironmentVariables@6.0.1", + "extracted_requirement": "6.0.1", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.FileExtensions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.UserSecrets@6.0.1", + "extracted_requirement": "6.0.1", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Physical@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Hosting.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Console@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Debug@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.EventLog@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.EventSource@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Hosting@6.0.1" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options.DataAnnotations@6.0.0", + "extracted_requirement": "[6.0.0, )", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Options.DataAnnotations", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.ComponentModel.Annotations@5.0.0", + "extracted_requirement": "5.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Options.DataAnnotations@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/McMaster.Extensions.CommandLineUtils@4.0.1", + "extracted_requirement": "4.0.1", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "McMaster.Extensions.CommandLineUtils", + "version": "4.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/System.ComponentModel.Annotations@5.0.0", + "extracted_requirement": "5.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/McMaster.Extensions.CommandLineUtils@4.0.1" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.Abstractions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Binder@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.Binder", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Binder@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.CommandLine@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.CommandLine", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.CommandLine@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.EnvironmentVariables@6.0.1", + "extracted_requirement": "6.0.1", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.EnvironmentVariables", + "version": "6.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.EnvironmentVariables@6.0.1" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.FileExtensions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.FileExtensions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Physical@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.FileExtensions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.Json", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.FileExtensions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Text.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Json@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.UserSecrets@6.0.1", + "extracted_requirement": "6.0.1", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Configuration.UserSecrets", + "version": "6.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Physical@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.UserSecrets@6.0.1" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.DependencyInjection", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.FileProviders.Abstractions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Physical@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.FileProviders.Physical", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileSystemGlobbing@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Physical@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileSystemGlobbing@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.FileSystemGlobbing", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.FileSystemGlobbing@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Hosting.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Hosting.Abstractions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.FileProviders.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Hosting.Abstractions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Diagnostics.DiagnosticSource@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging.Abstractions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging.Configuration", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Binder@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options.ConfigurationExtensions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Configuration@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Console@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging.Console", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Configuration@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Text.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Console@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Debug@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging.Debug", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Debug@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.EventLog@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging.EventLog", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Diagnostics.EventLog@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging.EventLog@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.EventSource@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Logging.EventSource", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Logging.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Text.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Logging.EventSource@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Options", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options.ConfigurationExtensions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Options.ConfigurationExtensions", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Configuration.Binder@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.DependencyInjection.Abstractions@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Options@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Options.ConfigurationExtensions@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Extensions.Primitives", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/Microsoft.Extensions.Primitives@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.ComponentModel.Annotations@5.0.0", + "extracted_requirement": "5.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "System.ComponentModel.Annotations", + "version": "5.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/System.ComponentModel.Annotations@5.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Diagnostics.DiagnosticSource@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "System.Diagnostics.DiagnosticSource", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/System.Diagnostics.DiagnosticSource@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Diagnostics.EventLog@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "System.Diagnostics.EventLog", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/System.Diagnostics.EventLog@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "System.Runtime.CompilerServices.Unsafe", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Text.Encodings.Web@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "System.Text.Encodings.Web", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/System.Text.Encodings.Web@6.0.0" + }, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Text.Json@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "nuget", + "namespace": null, + "name": "System.Text.Json", + "version": "6.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/System.Runtime.CompilerServices.Unsafe@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:nuget/System.Text.Encodings.Web@6.0.0", + "extracted_requirement": "6.0.0", + "scope": "net6.0", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": "pkg:nuget/System.Text.Json@6.0.0" + }, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "nuget_packages_lock", + "purl": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/plugin/help.txt b/tests/packagedcode/data/plugin/help.txt index 83ba2045a85..7b5d549f707 100755 --- a/tests/packagedcode/data/plugin/help.txt +++ b/tests/packagedcode/data/plugin/help.txt @@ -636,6 +636,13 @@ Package type: nuget description: NuGet nuspec package manifest path_patterns: '*.nuspec' -------------------------------------------- +Package type: nuget + datasource_id: nuget_packages_lock + documentation URL: https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-restore + primary language: None + description: NuGet packages.lock.json file + path_patterns: '*packages.lock.json' +-------------------------------------------- Package type: opam datasource_id: opam_file documentation URL: https://opam.ocaml.org/doc/Manual.html#Common-file-format diff --git a/tests/packagedcode/test_nuget.py b/tests/packagedcode/test_nuget.py index 647b3d1024e..d3af13ab51b 100644 --- a/tests/packagedcode/test_nuget.py +++ b/tests/packagedcode/test_nuget.py @@ -62,3 +62,13 @@ def test_parse_as_package_only(self): package = nuget.NugetNuspecHandler.parse(location=test_file, package_only=True) expected_loc = self.get_test_loc('nuget/Castle.Core.nuspec-package-only.json.expected') self.check_packages_data(package, expected_loc, regen=REGEN_TEST_FIXTURES, package_only=True) + + def test_parse_nuget_package_lock_json(self): + test_file = self.get_test_loc('nuget/packages.lock.json') + package = nuget.NugetPackagesLockHandler.parse(location=test_file) + expected_loc = self.get_test_loc('nuget/packages.lock.json.expected') + self.check_packages_data(package, expected_loc, regen=REGEN_TEST_FIXTURES, package_only=True) + + def test_package_lock_json_is_package_data_file(self): + test_file = self.get_test_loc('nuget/packages.lock.json') + assert nuget.NugetPackagesLockHandler.is_datafile(test_file) From 9a6354d39dc00c3998706cabcb71107d66664f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 26 Jun 2024 15:15:22 +0200 Subject: [PATCH 30/30] Mention that in Fedora you can now install scancode from Fedora repo (#3824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Suchý Co-authored-by: Ayan Sinha Mahapatra --- README.rst | 4 +++- docs/source/getting-started/install.rst | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index eca9654c3b2..71e3ce6ba48 100644 --- a/README.rst +++ b/README.rst @@ -161,6 +161,8 @@ There are a few common ways to `install ScanCode `_ +- In Fedora 40+ you can `dnf install scancode-toolkit` + Quick Start =========== @@ -258,4 +260,4 @@ the third-party code used in ScanCode for more details. .. |release-github-actions| image:: https://github.com/nexB/scancode-toolkit/actions/workflows/scancode-release.yml/badge.svg?event=push :target: https://github.com/nexB/scancode-toolkit/actions/workflows/scancode-release.yml - :alt: Release tests \ No newline at end of file + :alt: Release tests diff --git a/docs/source/getting-started/install.rst b/docs/source/getting-started/install.rst index d890150420f..ff8601c7c27 100644 --- a/docs/source/getting-started/install.rst +++ b/docs/source/getting-started/install.rst @@ -34,6 +34,11 @@ For advanced usage and experienced users, you can also use any of these mode: ``pip``. This is recommended for developers or users familiar with Python that want to embed ScanCode as a library. +- :ref:`fedora_install` + + ScanCode is part of main Fedora Linux repository. It will automatically install + all dependencies. This is recommended for production deployments. + ---- Before Installing @@ -412,6 +417,22 @@ To uninstall, run:: pip uninstall scancode-toolkit +---- + +.. _fedora_install: + +Install from Fedora's repository +-------------------------------- + +The package is available in Fedora 40 and newer. Run:: + + dnf install scancode-toolkit + +To uninstall, run:: + + dnf remove scancode-toolkit + + ---- .. _commands_variation: