diff --git a/src/licensedcode/cache.py b/src/licensedcode/cache.py index e25abc37bbd..92998a2bb41 100644 --- a/src/licensedcode/cache.py +++ b/src/licensedcode/cache.py @@ -515,6 +515,9 @@ def build_spdx_license_expression(license_expression, licensing=None): >>> spdx = "MIT OR GPL-2.0-only WITH LicenseRef-scancode-generic-exception" >>> assert build_spdx_license_expression(exp) == spdx """ + if not license_expression: + return + if not licensing: licensing = get_licensing() validate_spdx_license_keys(license_expression=license_expression, licensing=licensing) diff --git a/src/licensedcode/data/rules/lead-in_unknown_43.RULE b/src/licensedcode/data/rules/lead-in_unknown_43.RULE index fe40deb0434..7eee595bcb1 100644 --- a/src/licensedcode/data/rules/lead-in_unknown_43.RULE +++ b/src/licensedcode/data/rules/lead-in_unknown_43.RULE @@ -1,6 +1,6 @@ --- license_expression: unknown-license-reference -is_license_tag: yes +is_license_clue: yes relevance: 60 notes: Creative commons tag seen in RDF or XML documents --- diff --git a/src/licensedcode/detection.py b/src/licensedcode/detection.py index e88ca5f82da..34cbe582e63 100644 --- a/src/licensedcode/detection.py +++ b/src/licensedcode/detection.py @@ -23,6 +23,7 @@ from commoncode.resource import clean_path from commoncode.text import python_safe_name +from commoncode.fileutils import as_posixpath from licensedcode.cache import build_spdx_license_expression from licensedcode.cache import get_cache from licensedcode.cache import get_index @@ -37,6 +38,8 @@ from licensedcode.spans import Span from licensedcode.tokenize import query_tokenizer +from summarycode.classify import check_is_path_community_file + """ LicenseDetection data structure and processing. @@ -45,6 +48,7 @@ """ TRACE = os.environ.get('SCANCODE_DEBUG_LICENSE_DETECTION', False) +TRACE_REFERENCE = os.environ.get('SCANCODE_DEBUG_PLUGIN_LICENSE_REFERENCE', False) TRACE_ANALYSIS = False TRACE_IS_FUNCTIONS = False @@ -127,6 +131,7 @@ class DetectionRule(Enum): EXTRA_WORDS = 'extra-words' LICENSE_CLUES = 'license-clues' LOW_QUALITY_MATCH_FRAGMENTS = 'low-quality-matches' + IMPERFECT_COVERAGE = 'imperfect-match-coverage' FALSE_POSITIVE = 'possible-false-positive' NOT_LICENSE_CLUES = 'not-license-clues-as-more-detections-present' UNKNOWN_REFERENCE_TO_LOCAL_FILE = 'unknown-reference-to-local-file' @@ -900,6 +905,15 @@ class UniqueDetection: detection_log = attr.ib(default=attr.Factory(list)) file_regions = attr.ib(factory=list) + @property + def is_unknown(self): + """ + Return True if there are unknown license keys in the license expression + for this detection, return False otherwise. By design these are licenses with "unknown" in + their key. + """ + return 'unknown' in self.license_expression + @classmethod def get_unique_detections(cls, license_detections): """ @@ -1136,10 +1150,10 @@ def has_extra_words(license_matches): def has_low_rule_relevance(license_matches): """ - Return True if any on the matches in ``license_matches`` List of LicenseMatch + Return True if all on the matches in ``license_matches`` List of LicenseMatch objects has a match with low score because of low rule relevance. """ - return any( + return all( license_match.rule.relevance < LOW_RELEVANCE_THRESHOLD for license_match in license_matches ) @@ -1235,11 +1249,16 @@ def has_unknown_matches(license_matches): def is_unknown_intro(license_match): """ - Return True if the LicenseMatch is an unknown license intro. + Return True if the LicenseMatch is unknown and can be considered + as a license intro to other license matches. + I.e. this is not an unknown when followed by other proper matches. """ return ( license_match.rule.has_unknown and - license_match.rule.is_license_intro + ( + license_match.rule.is_license_intro or license_match.rule.is_license_clue or + license_match.rule.license_expression == 'free-unknown' + ) ) @@ -1335,7 +1354,10 @@ def is_license_intro(license_match): from licensedcode.match_aho import MATCH_AHO_EXACT return ( - license_match.rule.is_license_intro + ( + license_match.rule.is_license_intro or license_match.rule.is_license_clue or + license_match.rule.license_expression == 'free-unknown' + ) and ( license_match.matcher == MATCH_AHO_EXACT or license_match.coverage() == 100 @@ -1551,10 +1573,16 @@ def get_detected_license_expression( elif analysis == DetectionCategory.EXTRA_WORDS.value: if TRACE_ANALYSIS: logger_debug(f'analysis {DetectionCategory.EXTRA_WORDS.value}') - # Apply filtering or handling logic if needed + # TODO: Fix score if extra words allowed in rules matches_for_expression = license_matches detection_log.append(DetectionRule.EXTRA_WORDS.value) + elif analysis == DetectionCategory.IMPERFECT_COVERAGE.value: + if TRACE_ANALYSIS: + logger_debug(f'analysis {DetectionCategory.IMPERFECT_COVERAGE.value}') + matches_for_expression = license_matches + detection_log.append(DetectionRule.IMPERFECT_COVERAGE.value) + else: if TRACE_ANALYSIS: logger_debug(f'analysis not-combined') @@ -1666,6 +1694,25 @@ def get_license_keys_from_detections(license_detections, licensing=Licensing()): return list(license_keys) +def can_ignore_ambiguous_detection(license_detection): + """ + Return True if the license_detection is not an ambigious detection + which needs to be reviewed. A few cases are: + 1. All the locations of the license detection are community files + """ + all_file_paths = [ + file_region.path + for file_region in license_detection.file_regions + ] + if all( + check_is_path_community_file(file_path) + for file_path in all_file_paths + ): + return True + + return False + + def get_ambiguous_license_detections_by_type(unique_license_detections): """ Return a list of ambiguous unique license detections which needs review @@ -1676,18 +1723,24 @@ def get_ambiguous_license_detections_by_type(unique_license_detections): ambi_license_detections = {} for detection in unique_license_detections: + if not detection.license_expression: ambi_license_detections[DetectionCategory.LOW_QUALITY_MATCH_FRAGMENTS.value] = detection + elif can_ignore_ambiguous_detection(detection): + continue + elif is_undetected_license_matches(license_matches=detection.matches): ambi_license_detections[DetectionCategory.UNDETECTED_LICENSE.value] = detection - elif has_correct_license_clue_matches(license_matches=detection.matches): + elif ( + has_correct_license_clue_matches(license_matches=detection.matches) and + has_unknown_matches(license_matches=detection.matches) + ): ambi_license_detections[DetectionCategory.LICENSE_CLUES.value] = detection - elif "unknown" in detection.license_expression: - if has_unknown_matches(license_matches=detection.matches): - ambi_license_detections[DetectionCategory.UNKNOWN_MATCH.value] = detection + elif detection.is_unknown: + ambi_license_detections[DetectionCategory.UNKNOWN_MATCH.value] = detection elif is_match_coverage_less_than_threshold( license_matches=detection.matches, @@ -1829,11 +1882,80 @@ def get_referenced_filenames(license_matches): return unique_filenames +def has_resolved_referenced_file(license_matches): + """ + Return True if a list of ``license_matches`` has matches from both the original + files and the referenced files. This would mean that the license reference is + resolved successfully. + """ + match_origin_files = list(set([ + license_match.from_file + for license_match in license_matches + ])) + if len(match_origin_files) >= 2: + return True + else: + return False + + +def find_referenced_resource_from_package(referenced_filename, resource, codebase, **kwargs): + """ + Return a Resource matching the ``referenced_filename`` path or filename + given a ``resource`` in ``codebase``. + + To find the `referenced_filename` the sibling files are searched beside all the + package manifest paths, for all the packages which the resource is a part of, + to resolve references to files in package ecosystem specific locations. + + Return None if the ``referenced_filename`` cannot be found in the same + directory as the base ``resource``, or at the codebase ``root``. + + ``referenced_filename`` is the path or filename referenced in a + LicenseMatch detected at ``resource``, + """ + codebase_packages = codebase.attributes.packages + if not (resource and codebase_packages): + return + + datafile_paths_by_package_uid = {} + for package in codebase_packages: + package_uid = package.get("package_uid") + datafile_paths = package.get("datafile_paths") + if package_uid and datafile_paths: + datafile_paths_by_package_uid[package_uid] = datafile_paths + + root_path = codebase.root.path + + for package_uid in resource.for_packages: + if not package_uid in datafile_paths_by_package_uid: + continue + + datafile_paths = datafile_paths_by_package_uid.get(package_uid) + for path in datafile_paths: + # support strip_root and normal cases + if not as_posixpath(path).startswith(f"{as_posixpath(root_path)}/"): + datafile_path = posixpath.join(root_path, path) + else: + datafile_path = path + datafile_resource = codebase.get_resource(path=datafile_path) + if not datafile_resource or not datafile_resource.parent_path(): + continue + + parent_path = datafile_resource.parent_path() + referenced_path = posixpath.join(parent_path, referenced_filename) + referenced_resource = codebase.get_resource(path=referenced_path) + if referenced_resource: + return referenced_resource + + def find_referenced_resource(referenced_filename, resource, codebase, **kwargs): """ Return a Resource matching the ``referenced_filename`` path or filename given a ``resource`` in ``codebase``. + To find the `referenced_filename` the sibling files of the `resource` + and files at the `codebase` root are searched. + Return None if the ``referenced_filename`` cannot be found in the same directory as the base ``resource``, or at the codebase ``root``. @@ -1855,8 +1977,6 @@ def find_referenced_resource(referenced_filename, resource, codebase, **kwargs): return resource # Also look at codebase root for referenced file - # TODO: look at project root identified by key-files - # instead of codebase scan root root_path = codebase.root.path path = posixpath.join(root_path, referenced_filename) resource = codebase.get_resource(path=path) @@ -1864,6 +1984,152 @@ def find_referenced_resource(referenced_filename, resource, codebase, **kwargs): return resource +def update_expressions_from_license_detections(resource, codebase): + """ + Set the `detected_license_expression` and `detected_license_expression_spdx` + for a `resource` from the individual license_expressions of it's detections. + + This needs to be executed after license detections in a resource are modified, + for example when detections are updated with license matches from a resolved + reference to a file. + """ + license_expressions = [ + detection["license_expression"] + for detection in resource.license_detections + ] + detected_license_expression = combine_expressions( + expressions=license_expressions, + relation='AND', + unique=True, + licensing=get_cache().licensing) + if detected_license_expression is not None: + detected_license_expression = str(detected_license_expression) + + resource.detected_license_expression = detected_license_expression + + detected_license_expression_spdx = build_spdx_license_expression( + license_expression=resource.detected_license_expression, + licensing=get_cache().licensing) + + if detected_license_expression_spdx is not None: + detected_license_expression_spdx = str(detected_license_expression_spdx) + + resource.detected_license_expression_spdx = detected_license_expression_spdx + + codebase.save_resource(resource) + return resource + + +def update_detection_from_referenced_files( + referenced_filenames, + license_detection_mapping, + resource, + codebase, + analysis, + find_referenced_resource_func, +): + """ + Return True if the `license_detection_mapping` was updated with resolved + license references to other `referenced_filenames`, or return False otherwise. + """ + license_detection = LicenseDetectionFromResult.from_license_detection_mapping( + license_detection_mapping=license_detection_mapping, + file_path=resource.path, + ) + license_match_mappings = license_detection_mapping["matches"] + + referenced_detections = [] + referenced_resources = [] + for referenced_filename in referenced_filenames: + referenced_resource = find_referenced_resource_func( + referenced_filename=referenced_filename, + resource=resource, + codebase=codebase, + ) + + if referenced_resource and referenced_resource.license_detections: + referenced_detections.extend( + referenced_resource.license_detections + ) + referenced_resources.append(referenced_resource) + + # For LicenseMatches with different resources as origin, add the + # resource path to these matches as origin info + for detection in referenced_resource.license_detections: + populate_matches_with_path( + matches=detection["matches"], + path=referenced_resource.path + ) + + if not referenced_detections: + return False + + referenced_license_expression = str(combine_expressions( + expressions=[ + detection["license_expression"] + for detection in referenced_detections + ], + relation='AND', + licensing=get_cache().licensing, + )) + + if not use_referenced_license_expression( + referenced_license_expression=referenced_license_expression, + license_detection=license_detection, + ): + if TRACE_REFERENCE and referenced_resources: + paths = [ + resource.path + for resource in referenced_resource + ] + logger_debug( + f'use_referenced_license_expression: False for ' + f'resources: {paths} and ' + f'license_expression: {referenced_license_expression}', + ) + return False + + if TRACE_REFERENCE and referenced_resources: + paths = [ + resource.path + for resource in referenced_resource + ] + logger_debug( + f'use_referenced_license_expression: True for ' + f'resources: {paths} and ' + f'license_expression: {referenced_license_expression}', + ) + + matches_to_extend = get_matches_from_detection_mappings( + license_detections=referenced_detections, + ) + license_match_mappings.extend(matches_to_extend) + + detection_log, license_expression = get_detected_license_expression( + license_match_mappings=license_match_mappings, + analysis=analysis, + post_scan=True, + ) + + license_expression_spdx = build_spdx_license_expression( + license_expression=str(license_expression), + licensing=get_cache().licensing, + ) + if license_expression is not None: + license_expression = str(license_expression) + if license_expression_spdx is not None: + license_expression_spdx = str(license_expression_spdx) + license_detection_mapping["license_expression"] = license_expression + license_detection_mapping["license_expression_spdx"] = license_expression_spdx + license_detection_mapping["detection_log"] = detection_log + license_detection_mapping["identifier"] = get_new_identifier_from_detections( + initial_detection=license_detection_mapping, + detections_added=referenced_detections, + license_expression=license_expression, + ) + return True + + def process_detections(detections, licensing=Licensing()): """ Yield LicenseDetection objects given a list of LicenseDetection objects diff --git a/src/licensedcode/plugin_license.py b/src/licensedcode/plugin_license.py index 064c852cc7f..f9cff29ae2e 100644 --- a/src/licensedcode/plugin_license.py +++ b/src/licensedcode/plugin_license.py @@ -15,23 +15,19 @@ from commoncode.cliutils import PluggableCommandLineOption from commoncode.cliutils import SCAN_GROUP from commoncode.cliutils import SCAN_OPTIONS_GROUP -from license_expression import combine_expressions from plugincode.scan import ScanPlugin from plugincode.scan import scan_impl -from licensedcode.cache import build_spdx_license_expression, get_cache from licensedcode.detection import collect_license_detections -from licensedcode.detection import populate_matches_with_path -from licensedcode.detection import find_referenced_resource -from licensedcode.detection import get_detected_license_expression -from licensedcode.detection import get_matches_from_detection_mappings -from licensedcode.detection import get_new_identifier_from_detections from licensedcode.detection import get_referenced_filenames from licensedcode.detection import DetectionCategory from licensedcode.detection import LicenseDetectionFromResult from licensedcode.detection import sort_unique_detections from licensedcode.detection import UniqueDetection -from licensedcode.detection import use_referenced_license_expression +from licensedcode.detection import update_detection_from_referenced_files +from licensedcode.detection import update_expressions_from_license_detections +from licensedcode.detection import find_referenced_resource +from licensedcode.detection import has_resolved_referenced_file from scancode.api import SCANCODE_LICENSEDB_URL TRACE = os.environ.get('SCANCODE_DEBUG_PLUGIN_LICENSE', False) @@ -82,7 +78,7 @@ class LicenseScanner(ScanPlugin): ) run_order = 4 - sort_order = 4 + sort_order = 5 options = [ PluggableCommandLineOption(('-l', '--license'), @@ -269,122 +265,35 @@ def add_referenced_filenames_license_matches_for_detections(resource, codebase): f'add_referenced_license_matches: resource_path: {resource.path}', ) - licensing = get_cache().licensing - for license_detection_mapping in license_detection_mappings: license_detection = LicenseDetectionFromResult.from_license_detection_mapping( license_detection_mapping=license_detection_mapping, file_path=resource.path, ) - license_match_mappings = license_detection_mapping["matches"] referenced_filenames = get_referenced_filenames(license_detection.matches) - if not referenced_filenames: - if TRACE_REFERENCE: - logger_debug( - f'No references at license detection with expression: {license_detection.license_expression}', - ) - continue - - referenced_detections = [] - for referenced_filename in referenced_filenames: - referenced_resource = find_referenced_resource( - referenced_filename=referenced_filename, - resource=resource, - codebase=codebase, - ) - - if referenced_resource and referenced_resource.license_detections: - referenced_detections.extend( - referenced_resource.license_detections - ) - - for detection in referenced_resource.license_detections: - populate_matches_with_path( - matches=detection["matches"], - path=referenced_resource.path - ) - - referenced_license_expression = combine_expressions( - expressions=[ - detection["license_expression"] - for detection in referenced_detections - ], - relation='AND', - licensing=licensing, - ) - if not use_referenced_license_expression( - referenced_license_expression=referenced_license_expression, - license_detection=license_detection, - ): + if not referenced_filenames or has_resolved_referenced_file(license_detection.matches): if TRACE_REFERENCE: logger_debug( - f'use_referenced_license_expression: False for ' - f'resource: {referenced_resource.path} and ' - f'license_expression: {referenced_license_expression}', + f'No references to resolve at license detection with expression: {license_detection.license_expression}', ) continue - if TRACE_REFERENCE: - logger_debug( - f'use_referenced_license_expression: True for ' - f'resource: {referenced_resource.path} and ' - f'license_expression: {referenced_license_expression}', - ) - - modified = True - matches_to_extend = get_matches_from_detection_mappings( - license_detections=referenced_detections - ) - license_match_mappings.extend(matches_to_extend) - - detection_log, license_expression = get_detected_license_expression( - license_match_mappings=license_match_mappings, + is_modified = update_detection_from_referenced_files( + referenced_filenames=referenced_filenames, + license_detection_mapping=license_detection_mapping, + resource=resource, + codebase=codebase, analysis=DetectionCategory.UNKNOWN_FILE_REFERENCE_LOCAL.value, - post_scan=True, - ) - - license_expression_spdx = build_spdx_license_expression( - license_expression=str(license_expression), - licensing=licensing, - ) - if license_expression is not None: - license_expression = str(license_expression) - if license_expression_spdx is not None: - license_expression_spdx = str(license_expression_spdx) - license_detection_mapping["license_expression"] = license_expression - license_detection_mapping["license_expression_spdx"] = license_expression_spdx - license_detection_mapping["detection_log"] = detection_log - license_detection_mapping["identifier"] = get_new_identifier_from_detections( - initial_detection=license_detection_mapping, - detections_added=referenced_detections, - license_expression=license_expression, + find_referenced_resource_func=find_referenced_resource, ) + if is_modified: + modified = True if modified: - license_expressions = [ - detection["license_expression"] - for detection in resource.license_detections - ] - detected_license_expression = combine_expressions( - expressions=license_expressions, - relation='AND', - unique=True, - licensing=licensing) - if detected_license_expression is not None: - detected_license_expression = str(detected_license_expression) - - resource.detected_license_expression = detected_license_expression - - detected_license_expression_spdx = build_spdx_license_expression( - license_expression=resource.detected_license_expression, - licensing=licensing) - - if detected_license_expression_spdx is not None: - detected_license_expression_spdx = str(detected_license_expression_spdx) - - resource.detected_license_expression_spdx = detected_license_expression_spdx - - codebase.save_resource(resource) + resource = update_expressions_from_license_detections( + resource=resource, + codebase=codebase, + ) return resource diff --git a/src/packagedcode/licensing.py b/src/packagedcode/licensing.py index dc55c1f09ad..75682f1db46 100644 --- a/src/packagedcode/licensing.py +++ b/src/packagedcode/licensing.py @@ -19,15 +19,18 @@ from licensedcode.detection import DetectionCategory from licensedcode.detection import group_matches from licensedcode.detection import get_detected_license_expression -from licensedcode.detection import get_matches_from_detection_mappings from licensedcode.detection import get_new_identifier_from_detections from licensedcode.detection import get_unknown_license_detection from licensedcode.detection import get_referenced_filenames -from licensedcode.detection import find_referenced_resource +from licensedcode.detection import find_referenced_resource_from_package from licensedcode.detection import detect_licenses from licensedcode.detection import LicenseDetectionFromResult from licensedcode.detection import populate_matches_with_path from licensedcode.detection import use_referenced_license_expression +from licensedcode.detection import has_resolved_referenced_file +from licensedcode.detection import update_detection_from_referenced_files +from licensedcode.detection import update_expressions_from_license_detections +from licensedcode.detection import find_referenced_resource from licensedcode.spans import Span from licensedcode import query @@ -41,6 +44,7 @@ """ TRACE = os.environ.get('SCANCODE_DEBUG_PACKAGE_LICENSE', False) +TRACE_REFERENCE = os.environ.get('SCANCODE_DEBUG_PLUGIN_LICENSE_REFERENCE', False) def logger_debug(*args): @@ -98,69 +102,24 @@ def add_referenced_license_matches_for_package(resource, codebase): file_path=resource.path, ) - detections_added = [] - license_match_mappings = license_detection_mapping["matches"] referenced_filenames = get_referenced_filenames(license_detection_object.matches) - if not referenced_filenames: - continue - - referenced_detections = [] - for referenced_filename in referenced_filenames: - referenced_resource = find_referenced_resource( - referenced_filename=referenced_filename, - resource=resource, - codebase=codebase, - ) - - if referenced_resource and referenced_resource.license_detections: - referenced_detections.extend( - referenced_resource.license_detections + if not referenced_filenames or has_resolved_referenced_file(license_detection_object.matches): + if TRACE_REFERENCE: + logger_debug( + f'No references to resolve at license detection with expression: {license_detection_object.license_expression}', ) - - # For LicenseMatches with different resources as origin, add the - # resource path to these matches as origin info - for detection in referenced_resource.license_detections: - populate_matches_with_path( - matches=detection["matches"], - path=referenced_resource.path - ) - - referenced_license_expression = combine_expressions( - expressions=[ - detection["license_expression"] - for detection in referenced_detections - ], - ) - if not use_referenced_license_expression( - referenced_license_expression=referenced_license_expression, - license_detection=license_detection_object, - ): continue - modified = True - detections_added.extend(referenced_resource.license_detections) - matches_to_extend = get_matches_from_detection_mappings( - license_detections=referenced_resource.license_detections, - ) - license_match_mappings.extend(matches_to_extend) - - detection_log, license_expression = get_detected_license_expression( - license_match_mappings=license_match_mappings, + is_modified = update_detection_from_referenced_files( + referenced_filenames=referenced_filenames, + license_detection_mapping=license_detection_mapping, + resource=resource, + codebase=codebase, analysis=DetectionCategory.PACKAGE_UNKNOWN_FILE_REFERENCE_LOCAL.value, - post_scan=True, - ) - license_expression_spdx = build_spdx_license_expression( - license_expression=str(license_expression), - licensing=get_cache().licensing, - ) - license_detection_mapping["license_expression"] = str(license_expression) - license_detection_mapping["license_expression_spdx"] = str(license_expression_spdx) - license_detection_mapping["detection_log"] = detection_log - license_detection_mapping["identifier"] = get_new_identifier_from_detections( - initial_detection=license_detection_mapping, - detections_added=detections_added, - license_expression=license_expression, + find_referenced_resource_func=find_referenced_resource, ) + if is_modified: + modified = True if modified: license_expressions = [ @@ -215,7 +174,7 @@ def add_referenced_license_detection_from_package(resource, codebase): license_match_mappings = license_detection_mapping["matches"] detections_added = [] referenced_filenames = get_referenced_filenames(license_matches=license_detection_object.matches) - if not referenced_filenames: + if not referenced_filenames or has_resolved_referenced_file(license_detection_object.matches): continue has_reference_to_package = any([ @@ -376,6 +335,66 @@ def add_license_from_sibling_file(resource, codebase): return package +def add_referenced_license_detection_from_package_manifest_siblings(resource, codebase): + """ + Return True if we have references to licenses in other files and we could find and resolve + the references successfully. Resolving the references mean adding licenses matches from + the referenced file and updating the license expressions accordingly. + """ + if TRACE: + logger_debug(f'packagedcode.licensing: add_referenced_license_detection_from_package_manifest_siblings: resource: {resource.path}') + + if not resource.is_file: + return + + license_detection_mappings = resource.license_detections + if not license_detection_mappings: + return + + resource_packages = resource.for_packages + if not resource_packages: + return + + modified = False + + if TRACE_REFERENCE: + logger_debug( + f'add_referenced_license_matches: resource_path: {resource.path}', + ) + + for license_detection_mapping in license_detection_mappings: + + license_detection = LicenseDetectionFromResult.from_license_detection_mapping( + license_detection_mapping=license_detection_mapping, + file_path=resource.path, + ) + referenced_filenames = get_referenced_filenames(license_detection.matches) + if not referenced_filenames or has_resolved_referenced_file(license_detection.matches): + if TRACE_REFERENCE: + logger_debug( + f'No references to resolve at license detection with expression: {license_detection.license_expression}', + ) + continue + + is_modified = update_detection_from_referenced_files( + referenced_filenames=referenced_filenames, + license_detection_mapping=license_detection_mapping, + resource=resource, + codebase=codebase, + analysis=DetectionCategory.UNKNOWN_FILE_REFERENCE_LOCAL.value, + find_referenced_resource_func=find_referenced_resource_from_package, + ) + if is_modified: + modified = True + + if modified: + resource = update_expressions_from_license_detections( + resource=resource, + codebase=codebase, + ) + return resource + + def is_legal_or_readme(resource): """ Return True if `resource` is a legal (like LICENSE/COPYING) or README file, otherwise @@ -831,8 +850,8 @@ def get_license_detections_and_expression( datasource_id=None, ): """ - Given a text `extracted_license_statement` return a list of LicenseDetection objects. - `extracted_license_statement` is typically found in package manifests. + Return a list of LicenseDetection objects from an `extracted_license_statement` + text. `extracted_license_statement` is typically found in package manifests. If `try_as_expression` is True try first to parse this as a license expression using the ``expression_symbols`` mapping of {lowered key: @@ -893,7 +912,7 @@ def get_license_detections_for_extracted_license_statement( expression_symbols=None, ): """ - Return a list of LicenseDetection detected the ``extracted_license_statement`` string. + Return a list of LicenseDetection detected in the ``extracted_license_statement`` string. """ if not extracted_license_statement: return [] diff --git a/src/packagedcode/plugin_package.py b/src/packagedcode/plugin_package.py index 252d6cb1dd4..3ced6dc8718 100644 --- a/src/packagedcode/plugin_package.py +++ b/src/packagedcode/plugin_package.py @@ -29,6 +29,7 @@ from packagedcode import get_package_handler from packagedcode.licensing import add_referenced_license_matches_for_package from packagedcode.licensing import add_referenced_license_detection_from_package +from packagedcode.licensing import add_referenced_license_detection_from_package_manifest_siblings from packagedcode.licensing import add_license_from_sibling_file from packagedcode.licensing import get_license_expression_from_detection_mappings from packagedcode.models import add_to_package @@ -145,7 +146,7 @@ class PackageScanner(ScanPlugin): required_plugins = ['scan:licenses'] run_order = 3 - sort_order = 3 + sort_order = 4 options = [ PluggableCommandLineOption( @@ -270,11 +271,16 @@ def process_codebase(self, codebase, strip_root=False, package_only=False, **kwa # Create codebase-level packages and dependencies create_package_and_deps(codebase, strip_root=strip_root, **kwargs) - #raise Exception() if has_licenses: # This step is dependent on top level packages for resource in codebase.walk(topdown=False): + # If there is an unresolved unknown reference to a file, in a file which is part of a package + # we check if the referenced file is present beside the package manifest for the package + modified = add_referenced_license_detection_from_package_manifest_siblings(resource, codebase) + if TRACE_LICENSE and modified: + logger_debug(f'packagedcode: process_codebase: add_referenced_license_detection_from_package_manifest_siblings: modified: {modified}') + # If there is a unknown reference to a package we add the license # from the package license detection modified = list(add_referenced_license_detection_from_package(resource, codebase)) diff --git a/src/packagedcode/win_pe.py b/src/packagedcode/win_pe.py index ce040eaedfe..2790cf5a6aa 100644 --- a/src/packagedcode/win_pe.py +++ b/src/packagedcode/win_pe.py @@ -17,6 +17,8 @@ from packagedcode import models from packagedcode.models import Party from packagedcode.models import party_org +from cluecode.copyrights import detect_copyrights_from_lines +from cluecode.copyrights import prepare_text_line from typecode import contenttype TRACE = False @@ -237,6 +239,31 @@ def concat(mapping, *keys): return '\n'.join(values) + +def has_license_with_copyright(text): + """ + Return True if the LegalCopyright `text` could have some license + declarations and should be a part of the extracted_license_statement. + """ + copyrights = detect_copyrights_from_lines( + numbered_lines=[tuple([1, text])], + include_copyrights=True, + include_authors=False, + include_holders=False, + include_copyright_years=True, + include_copyright_allrights=True, + ) + detections = [detection.to_dict() for detection in copyrights] + if text and not detections: + return True + + if detections and "copyright" in detections[0]: + return False + + return True + + + class WindowsExecutableHandler(models.NonAssemblableDatafileHandler): datasource_id = 'windows_executable' default_package_type = 'winexe' @@ -278,66 +305,70 @@ def is_datafile(cls, location, filetypes=tuple()): @classmethod def parse(cls, location, package_only=False): infos = pe_info(location) + yield get_package_data_from_pe_info(infos, package_only) - version = get_first( - infos, - 'Full Version', - 'ProductVersion', - 'FileVersion', - 'Assembly Version', - ) - release_date = get_first(infos, 'BuildDate') - if release_date: - if len(release_date) >= 10: - release_date = release_date[:10] - release_date = release_date.replace('/', '-') - - name = get_first( - infos, - 'ProductName', - 'OriginalFilename', - 'InternalName', - ) - copyr = get_first(infos, 'LegalCopyright') - - LegalCopyright = copyr, - - LegalTrademarks = concat( - infos, - 'LegalTrademarks', - 'LegalTrademarks1', - 'LegalTrademarks2', - 'LegalTrademarks3') - - License = get_first(infos, 'License') +def get_package_data_from_pe_info(infos, package_only=False): + + version = get_first( + infos, + 'Full Version', + 'ProductVersion', + 'FileVersion', + 'Assembly Version', + ) + release_date = get_first(infos, 'BuildDate') + if release_date: + if len(release_date) >= 10: + release_date = release_date[:10] + release_date = release_date.replace('/', '-') + + name = get_first( + infos, + 'ProductName', + 'OriginalFilename', + 'InternalName', + ) + + LegalCopyright = get_first(infos, 'LegalCopyright') + copyr_has_license = LegalCopyright and has_license_with_copyright(LegalCopyright) + LegalTrademarks = concat( + infos, + 'LegalTrademarks', + 'LegalTrademarks1', + 'LegalTrademarks2', + 'LegalTrademarks3') + License = get_first(infos, 'License') + + extracted_license_statement = None + if copyr_has_license or LegalTrademarks or License: extracted_license_statement = {} - if LegalCopyright or LegalTrademarks or License: - extracted_license_statement = dict( - LegalCopyright=copyr, - LegalTrademarks=LegalTrademarks, - License=License - ) - - description = concat(infos, 'FileDescription', 'Comments') - - parties = [] - cname = get_first(infos, 'CompanyName', 'Company') - - if cname: - parties = [Party(type=party_org, role='author', name=cname)] - homepage_url = get_first(infos, 'URL', 'WWW') - - package_data = dict( - datasource_id=cls.datasource_id, - type=cls.default_package_type, - name=name, - version=version, - release_date=release_date, - copyright=copyr, - extracted_license_statement=extracted_license_statement, - description=description, - parties=parties, - homepage_url=homepage_url, - ) - yield models.PackageData.from_data(package_data, package_only) + if copyr_has_license: + extracted_license_statement['LegalCopyright'] = LegalCopyright + if LegalTrademarks and LegalTrademarks != '': + extracted_license_statement['LegalTrademarks'] = LegalTrademarks + if License: + extracted_license_statement['License'] = License + + description = concat(infos, 'FileDescription', 'Comments') + + parties = [] + cname = get_first(infos, 'CompanyName', 'Company') + + if cname: + parties = [Party(type=party_org, role='author', name=cname)] + homepage_url = get_first(infos, 'URL', 'WWW') + + package_data = dict( + datasource_id=WindowsExecutableHandler.datasource_id, + type=WindowsExecutableHandler.default_package_type, + name=name, + version=version, + release_date=release_date, + copyright=LegalCopyright, + extracted_license_statement=extracted_license_statement, + description=description, + parties=parties, + homepage_url=homepage_url, + ) + return models.PackageData.from_data(package_data, package_only) diff --git a/src/summarycode/classify.py b/src/summarycode/classify.py index fa78cfdca56..e07d6604826 100644 --- a/src/summarycode/classify.py +++ b/src/summarycode/classify.py @@ -8,6 +8,9 @@ # +from commoncode.fileutils import file_name +from commoncode.fileutils import file_base_name + def get_relative_path(root_path, path): """ Return a path relativefrom the posix 'path' relative to a @@ -91,11 +94,67 @@ def get_relative_path(root_path, path): 'readme', ) +# Community files are usually files used for FOSS project and community +# maintainence purposes. We want to detect these as in the context of +# licenses as these files don't have interesting license detections, or +# license detection issues are not important to review for these files. +# this is similar to `key` files, which also has a lot of community info +# but there the license declarations are extremely important as they have +# information on the primary (or even secondary) licenses for the package +COMMUNITY_FILES = ( + 'CHANGELOG', + 'ROADMAP', + 'CONTRIBUTING', + 'CODE_OF_CONDUCT', + 'AUTHORS', + 'SECURITY', + 'FUNDING', +) + + +def clean_underscore_dash(filename): + return filename.replace('_', '').replace('-', '') + + +def check_is_community_file(filename): + """ + Return True if the resource is a known community filename, + return False otherwise. + """ + community_files_cleaned = [ + clean_underscore_dash(filename.lower()) + for filename in COMMUNITY_FILES + ] + name = clean_underscore_dash(filename.lower()) + if any( + name.startswith(comm_name) or name.endswith(comm_name) + for comm_name in community_files_cleaned + ): + return True + + return False + + +def check_is_resource_community_file(resource): + """ + Return True if the `resource` is a community file. + """ + return check_is_community_file(resource.name) or check_is_community_file(resource.base_name) + + +def check_is_path_community_file(path): + """ + Return True if the file at `path` is a community file. + """ + name = file_name(path, force_posix=True) + base_name = file_base_name(path, force_posix=True) + return check_is_community_file(name) or check_is_community_file(base_name) + def check_resource_name_start_and_end(resource, STARTS_ENDS): """ Return True if `resource.name` or `resource.base_name` begins or ends with - an element of `STARTS_ENDS` + an element of `STARTS_ENDS`. """ name = resource.name.lower() base_name = resource.base_name.lower() @@ -113,12 +172,13 @@ def set_classification_flags(resource, _README=README_STARTS_ENDS, ): """ - Set classification flags on the `resource` Resource + Set classification flags on the `resource` Resource. """ path = resource.path.lower() resource.is_legal = is_legal = check_resource_name_start_and_end(resource, _LEGAL) resource.is_readme = is_readme = check_resource_name_start_and_end(resource, _README) + resource.is_community = check_is_resource_community_file(resource) # FIXME: this will never be picked up as this is NOT available in a pre-scan plugin has_package_data = bool(getattr(resource, 'package_data', False)) resource.is_manifest = is_manifest = path.endswith(_MANIF) or has_package_data diff --git a/src/summarycode/classify_plugin.py b/src/summarycode/classify_plugin.py index 59e46da70dc..a77d3167302 100644 --- a/src/summarycode/classify_plugin.py +++ b/src/summarycode/classify_plugin.py @@ -77,6 +77,10 @@ class FileClassifier(PostScanPlugin): Boolean(help='True if this file is "top-level" file and either a ' 'legal, readme or manifest file.')), + ('is_community', + Boolean(help='True if this file is a community file generally used for' + 'maintainance or participation in the FOSS project community.')), + # ('is_doc', # Boolean(help='True if this file is likely a documentation file.')), # diff --git a/src/summarycode/todo.py b/src/summarycode/todo.py index 0d9687dfc5d..8ed5559083a 100644 --- a/src/summarycode/todo.py +++ b/src/summarycode/todo.py @@ -70,7 +70,7 @@ class AmbiguousDetectionsToDoPlugin(PostScanPlugin): """ Summarize a scan by compiling review items of ambiguous detections. """ - sort_order = 10 + sort_order = 3 resource_attributes = dict(for_todo=attr.ib(default=attr.Factory(list))) codebase_attributes = dict(todo=attr.ib(default=attr.Factory(list))) @@ -188,6 +188,13 @@ def get_ambiguous_package_detections(codebase): package_data = getattr(resource, 'package_data', []) or [] for package in package_data: detection_type = None + + # Top-level packages are not created for private packages so + # these should not be consider for package detection issues + is_private = package.get("is_private", False) + if is_private: + continue + if not package["purl"]: if resource.path not in deps_datafile_paths and not resource.for_packages: detection_type=PackageDetectionCategory.CANNOT_CREATE_PURL.value @@ -310,9 +317,11 @@ def from_license(cls, detection, detection_log, file_regions): license_diagnostics = False if detection_object.detection_log != None: license_diagnostics = True + license_text_diagnostics = True detection_mapping = detection_object.to_dict( include_text=True, license_diagnostics=license_diagnostics, + license_text_diagnostics=license_text_diagnostics, ) return cls( detection_type='license', diff --git a/tests/formattedcode/data/common/manifests-expected.yaml b/tests/formattedcode/data/common/manifests-expected.yaml index 9859df5e9ad..f79f4a099de 100644 --- a/tests/formattedcode/data/common/manifests-expected.yaml +++ b/tests/formattedcode/data/common/manifests-expected.yaml @@ -1883,13 +1883,14 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: [] is_legal: no is_manifest: no is_readme: no is_top_level: yes is_key_file: no + is_community: no + package_data: [] + for_packages: [] detected_license_expression: detected_license_expression_spdx: license_detections: [] @@ -1923,14 +1924,15 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: - - pkg:maven/javax.persistence/persistence-api@1.0?uuid=fixed-uid-done-for-testing-5642512d1758 is_legal: no is_manifest: no is_readme: no is_top_level: yes is_key_file: no + is_community: no + package_data: [] + for_packages: + - pkg:maven/javax.persistence/persistence-api@1.0?uuid=fixed-uid-done-for-testing-5642512d1758 detected_license_expression: detected_license_expression_spdx: license_detections: [] @@ -1964,6 +1966,12 @@ files: is_media: no is_source: no is_script: no + is_legal: no + is_manifest: no + is_readme: no + is_top_level: no + is_key_file: no + is_community: no package_data: - type: maven namespace: javax.persistence @@ -2035,11 +2043,6 @@ files: purl: pkg:maven/javax.persistence/persistence-api@1.0 for_packages: - pkg:maven/javax.persistence/persistence-api@1.0?uuid=fixed-uid-done-for-testing-5642512d1758 - is_legal: no - is_manifest: no - is_readme: no - is_top_level: no - is_key_file: no detected_license_expression: cddl-1.0 detected_license_expression_spdx: CDDL-1.0 license_detections: @@ -2100,13 +2103,14 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: [] is_legal: no is_manifest: no is_readme: no is_top_level: yes is_key_file: no + is_community: no + package_data: [] + for_packages: [] detected_license_expression: detected_license_expression_spdx: license_detections: [] @@ -2140,6 +2144,12 @@ files: is_media: no is_source: no is_script: no + is_legal: no + is_manifest: no + is_readme: no + is_top_level: no + is_key_file: no + is_community: no package_data: - type: npm namespace: @@ -2320,11 +2330,6 @@ files: purl: pkg:npm/grunt-esvm@3.2.8 for_packages: - pkg:npm/grunt-esvm@3.2.8?uuid=fixed-uid-done-for-testing-5642512d1758 - is_legal: no - is_manifest: no - is_readme: no - is_top_level: no - is_key_file: no detected_license_expression: apache-2.0 detected_license_expression_spdx: Apache-2.0 license_detections: @@ -2413,13 +2418,14 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: [] is_legal: no is_manifest: no is_readme: no is_top_level: yes is_key_file: no + is_community: no + package_data: [] + for_packages: [] detected_license_expression: detected_license_expression_spdx: license_detections: [] @@ -2453,6 +2459,12 @@ files: is_media: no is_source: no is_script: no + is_legal: no + is_manifest: no + is_readme: no + is_top_level: no + is_key_file: no + is_community: no package_data: - type: npm namespace: @@ -2566,11 +2578,6 @@ files: purl: pkg:npm/angular-compare-validator@0.1.1 for_packages: - pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758 - is_legal: no - is_manifest: no - is_readme: no - is_top_level: no - is_key_file: no detected_license_expression: mit detected_license_expression_spdx: MIT license_detections: @@ -2636,13 +2643,14 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: [] is_legal: no is_manifest: no is_readme: no is_top_level: yes is_key_file: no + is_community: no + package_data: [] + for_packages: [] detected_license_expression: detected_license_expression_spdx: license_detections: [] @@ -2676,6 +2684,12 @@ files: is_media: no is_source: yes is_script: yes + is_legal: no + is_manifest: no + is_readme: no + is_top_level: no + is_key_file: no + is_community: no package_data: - type: pypi namespace: @@ -2872,11 +2886,6 @@ files: purl: pkg:pypi/bluepyopt for_packages: - pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 - is_legal: no - is_manifest: no - is_readme: no - is_top_level: no - is_key_file: no detected_license_expression: lgpl-3.0 detected_license_expression_spdx: LGPL-3.0-only license_detections: diff --git a/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml b/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml index be82db689c9..0482ec43ead 100644 --- a/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml +++ b/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml @@ -1019,13 +1019,14 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: [] is_legal: no is_manifest: no is_readme: no is_top_level: yes is_key_file: no + is_community: no + package_data: [] + for_packages: [] detected_license_expression: detected_license_expression_spdx: license_detections: [] @@ -1059,14 +1060,15 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: - - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 is_legal: no is_manifest: no is_readme: yes is_top_level: yes is_key_file: yes + is_community: no + package_data: [] + for_packages: + - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 detected_license_expression: apache-2.0 AND (apache-2.0 OR mit) detected_license_expression_spdx: Apache-2.0 AND (Apache-2.0 OR MIT) license_detections: @@ -1136,14 +1138,15 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: - - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 is_legal: yes is_manifest: no is_readme: no is_top_level: yes is_key_file: yes + is_community: no + package_data: [] + for_packages: + - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 detected_license_expression: apache-2.0 detected_license_expression_spdx: Apache-2.0 license_detections: @@ -1346,14 +1349,15 @@ files: is_media: no is_source: no is_script: no - package_data: [] - for_packages: - - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 is_legal: yes is_manifest: no is_readme: no is_top_level: yes is_key_file: yes + is_community: no + package_data: [] + for_packages: + - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 detected_license_expression: mit detected_license_expression_spdx: MIT license_detections: @@ -1422,6 +1426,12 @@ files: is_media: no is_source: no is_script: no + is_legal: no + is_manifest: no + is_readme: no + is_top_level: no + is_key_file: no + is_community: no package_data: - type: pypi namespace: @@ -1489,11 +1499,6 @@ files: purl: pkg:pypi/codebase for_packages: - pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758 - is_legal: no - is_manifest: no - is_readme: no - is_top_level: no - is_key_file: no detected_license_expression: apache-2.0 detected_license_expression_spdx: Apache-2.0 license_detections: diff --git a/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json b/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json index d2530e52e39..72884e43385 100644 --- a/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json +++ b/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json @@ -314,7 +314,9 @@ "license_expression": "python AND python-cwi", "license_expression_spdx": "Python-2.0 AND LicenseRef-scancode-python-cwi", "detection_count": 1, - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "reference_matches": [ { "license_expression": "python", @@ -1821,7 +1823,9 @@ "matched_text_diagnostics": "Permission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Stichting Mathematisch\nCentrum or CWI not be used in advertising or publicity pertaining to\ndistribution of the software without specific, written prior\npermission.\n\nSTICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO\nTHIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE\nFOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT\nOF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "python_and_python_cwi-dda7296c-6bc9-a87c-6fcd-8aa47c3484dc" }, { diff --git a/tests/licensedcode/data/plugin_license/license_reference/unknown-ref-to-key-file-root.expected.json b/tests/licensedcode/data/plugin_license/license_reference/unknown-ref-to-key-file-root.expected.json index 601207caf9c..ead68bc5702 100644 --- a/tests/licensedcode/data/plugin_license/license_reference/unknown-ref-to-key-file-root.expected.json +++ b/tests/licensedcode/data/plugin_license/license_reference/unknown-ref-to-key-file-root.expected.json @@ -125,6 +125,65 @@ } ] }, + { + "identifier": "mit-ad99a349-2a14-9fe5-c6a6-366fd3b9067b", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [ + "unknown-reference-to-local-file" + ], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "unknown-ref-to-key-file-root/regex.coffee", + "start_line": 2, + "end_line": 2, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_1187.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_1187.RULE", + "matched_text": "# License: MIT. (See LICENSE.)", + "matched_text_diagnostics": "License: MIT. (See LICENSE.)" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "unknown-ref-to-key-file-root/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_26.RULE", + "matched_text": "The MIT License (MIT)", + "matched_text_diagnostics": "The MIT License (MIT)" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "unknown-ref-to-key-file-root/LICENSE", + "start_line": 5, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", + "matched_text_diagnostics": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." + } + ] + }, { "identifier": "mit-bdcba66f-6e80-f7bd-7994-748183fe5693", "license_expression": "mit", @@ -174,31 +233,6 @@ "matched_text_diagnostics": "mit\ncopyright:" } ] - }, - { - "identifier": "mit-eea7f51e-637f-984c-1e86-a78bca648bf8", - "license_expression": "mit", - "license_expression_spdx": "MIT", - "detection_count": 1, - "detection_log": [], - "reference_matches": [ - { - "license_expression": "mit", - "license_expression_spdx": "MIT", - "from_file": "unknown-ref-to-key-file-root/regex.coffee", - "start_line": 2, - "end_line": 2, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 4, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "mit_1187.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_1187.RULE", - "matched_text": "# License: MIT. (See LICENSE.)", - "matched_text_diagnostics": "License: MIT. (See LICENSE.)" - } - ] } ], "files": [ @@ -590,10 +624,44 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_1187.RULE", "matched_text": "# License: MIT. (See LICENSE.)", "matched_text_diagnostics": "License: MIT. (See LICENSE.)" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "unknown-ref-to-key-file-root/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_26.RULE", + "matched_text": "The MIT License (MIT)", + "matched_text_diagnostics": "The MIT License (MIT)" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "unknown-ref-to-key-file-root/LICENSE", + "start_line": 5, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", + "matched_text_diagnostics": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." } ], - "detection_log": [], - "identifier": "mit-eea7f51e-637f-984c-1e86-a78bca648bf8" + "detection_log": [ + "unknown-reference-to-local-file" + ], + "identifier": "mit-ad99a349-2a14-9fe5-c6a6-366fd3b9067b" } ], "license_clues": [], diff --git a/tests/licensedcode/data/plugin_license/text/scan-diag.expected.json b/tests/licensedcode/data/plugin_license/text/scan-diag.expected.json index b886ef54ba2..4edd72ac37f 100644 --- a/tests/licensedcode/data/plugin_license/text/scan-diag.expected.json +++ b/tests/licensedcode/data/plugin_license/text/scan-diag.expected.json @@ -5,7 +5,9 @@ "license_expression": "fsf-ap", "license_expression_spdx": "FSFAP", "detection_count": 1, - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "reference_matches": [ { "license_expression": "fsf-ap", @@ -114,7 +116,9 @@ "matched_text_diagnostics": "and distribution of this file, with or without modification, are\npermitted in any medium without [royalties] provided the copyright notice\nand this notice are preserved. This file is offered as-is, without any" } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "fsf_ap-49ad9aab-c91b-eeb7-e90f-dc3f959b1c36" } ], diff --git a/tests/licensedcode/data/plugin_license/text/scan.expected.json b/tests/licensedcode/data/plugin_license/text/scan.expected.json index 73f6d2b9582..22a5dbfbdce 100644 --- a/tests/licensedcode/data/plugin_license/text/scan.expected.json +++ b/tests/licensedcode/data/plugin_license/text/scan.expected.json @@ -5,7 +5,9 @@ "license_expression": "fsf-ap", "license_expression_spdx": "FSFAP", "detection_count": 1, - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "reference_matches": [ { "license_expression": "fsf-ap", @@ -110,7 +112,9 @@ "matched_text": "Reproduction and distribution of this file, with or without modification, are\npermitted in any medium without royalties provided the copyright notice\nand this notice are preserved. This file is offered as-is, without any warranties." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "fsf_ap-49ad9aab-c91b-eeb7-e90f-dc3f959b1c36" } ], diff --git a/tests/licensedcode/data/plugin_license/unknown_intro/scan-free-unknown-intro.expected.json b/tests/licensedcode/data/plugin_license/unknown_intro/scan-free-unknown-intro.expected.json new file mode 100644 index 00000000000..b942adb8915 --- /dev/null +++ b/tests/licensedcode/data/plugin_license/unknown_intro/scan-free-unknown-intro.expected.json @@ -0,0 +1,102 @@ +{ + "license_detections": [ + { + "identifier": "mit-5bfe2e00-00c1-6e00-d2a6-379ee31e7c0f", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [ + "unknown-intro-followed-by-match" + ], + "reference_matches": [ + { + "license_expression": "free-unknown", + "license_expression_spdx": "LicenseRef-scancode-free-unknown", + "from_file": "scan-free-unknown-intro/README.md", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 50.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 50, + "rule_identifier": "free-unknown_88.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown_88.RULE", + "matched_text": "This plugin was created in [Realytics](https://www.realytics.io/) in 2017. Thank you for supporting Open Source.\n\n## License", + "matched_text_diagnostics": "Open Source.\n\n## License" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "scan-free-unknown-intro/README.md", + "start_line": 5, + "end_line": 7, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_31.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_31.RULE", + "matched_text": "## License\n\nMIT License", + "matched_text_diagnostics": "License\n\nMIT License" + } + ] + } + ], + "files": [ + { + "path": "README.md", + "type": "file", + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "free-unknown", + "license_expression_spdx": "LicenseRef-scancode-free-unknown", + "from_file": "scan-free-unknown-intro/README.md", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 50.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 50, + "rule_identifier": "free-unknown_88.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown_88.RULE", + "matched_text": "This plugin was created in [Realytics](https://www.realytics.io/) in 2017. Thank you for supporting Open Source.\n\n## License", + "matched_text_diagnostics": "Open Source.\n\n## License" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "scan-free-unknown-intro/README.md", + "start_line": 5, + "end_line": 7, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_31.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_31.RULE", + "matched_text": "## License\n\nMIT License", + "matched_text_diagnostics": "License\n\nMIT License" + } + ], + "detection_log": [ + "unknown-intro-followed-by-match" + ], + "identifier": "mit-5bfe2e00-00c1-6e00-d2a6-379ee31e7c0f" + } + ], + "license_clues": [], + "percentage_of_license_text": 22.73, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/licensedcode/data/plugin_license/unknown_intro/scan-free-unknown-intro/README.md b/tests/licensedcode/data/plugin_license/unknown_intro/scan-free-unknown-intro/README.md new file mode 100644 index 00000000000..412919a2e22 --- /dev/null +++ b/tests/licensedcode/data/plugin_license/unknown_intro/scan-free-unknown-intro/README.md @@ -0,0 +1,7 @@ +## Credits + +This plugin was created in [Realytics](https://www.realytics.io/) in 2017. Thank you for supporting Open Source. + +## License + +MIT License diff --git a/tests/licensedcode/test_plugin_license_detection.py b/tests/licensedcode/test_plugin_license_detection.py index cc4d3a15fba..ff249bc9c58 100644 --- a/tests/licensedcode/test_plugin_license_detection.py +++ b/tests/licensedcode/test_plugin_license_detection.py @@ -21,7 +21,7 @@ def test_complicated_license_text_from_ffmpeg(): - test_dir = test_env.get_test_loc('plugin_license/scan/ffmpeg-LICENSE.md', copy=True) + test_dir = test_env.get_test_loc('plugin_license/scan/ffmpeg-LICENSE.md') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -38,8 +38,27 @@ def test_complicated_license_text_from_ffmpeg(): check_json_scan(test_loc, result_file, regen=REGEN_TEST_FIXTURES) +def test_license_match_free_unknown_license_intro(): + test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-free-unknown-intro/') + result_file = test_env.get_temp_file('json') + args = [ + '--license', + '--license-text', + '--license-text-diagnostics', + '--license-diagnostics', + '--strip-root', + '--verbose', + '--json', result_file, + test_dir, + ] + run_scan_click(args) + test_loc = test_env.get_test_loc('plugin_license/unknown_intro/scan-free-unknown-intro.expected.json') + check_json_scan(test_loc, result_file, regen=True) + + + def test_license_match_unknown_license_intro_with_imperfect_matches(): - test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-with-imperfect-matches/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-with-imperfect-matches/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -57,7 +76,7 @@ def test_license_match_unknown_license_intro_with_imperfect_matches(): def test_license_match_unknown_license_intro_with_dual_license(): - test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-dual-license/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-dual-license/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -75,7 +94,7 @@ def test_license_match_unknown_license_intro_with_dual_license(): def test_license_match_unknown_clues_is_not_in_expression(): - test_dir = test_env.get_test_loc('plugin_license/clues/woodstox/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/clues/woodstox/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -94,7 +113,7 @@ def test_license_match_unknown_clues_is_not_in_expression(): def test_license_match_extra_words_3_seq(): - test_dir = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-3-seq-license/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-3-seq-license/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -112,7 +131,7 @@ def test_license_match_extra_words_3_seq(): def test_license_match_extra_words_2_aho(): - test_dir = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-2-aho-license/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-2-aho-license/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -130,7 +149,7 @@ def test_license_match_extra_words_2_aho(): def test_license_match_unknown_license_intro_eclipse_foundation(): - test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -148,7 +167,7 @@ def test_license_match_unknown_license_intro_eclipse_foundation(): def test_license_match_unknown_license_intro_eclipse_foundation_tycho(): - test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation-tycho/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-eclipse-foundation-tycho/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -166,7 +185,7 @@ def test_license_match_unknown_license_intro_eclipse_foundation_tycho(): def test_license_match_unknown_license_intro_with_long_gaps_between(): - test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-long-gaps-between/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/unknown_intro/scan-unknown-intro-long-gaps-between/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -184,7 +203,7 @@ def test_license_match_unknown_license_intro_with_long_gaps_between(): def test_license_match_unknown_license_with_license_ref_to_key_file_at_root(): - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/unknown-ref-to-key-file-root', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/unknown-ref-to-key-file-root') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -202,7 +221,7 @@ def test_license_match_unknown_license_with_license_ref_to_key_file_at_root(): def test_license_match_unknown_license_with_license_reference(): - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -220,7 +239,7 @@ def test_license_match_unknown_license_with_license_reference(): def test_license_detection_with_ignorable_reference_different_expression(): - test_dir = test_env.get_test_loc('plugin_license/ignored_reference/or_and_problem/', copy=True) + test_dir = test_env.get_test_loc('plugin_license/ignored_reference/or_and_problem/') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -238,7 +257,7 @@ def test_license_detection_with_ignorable_reference_different_expression(): def test_license_match_unknown_license_without_license_reference(): - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/license-ref-see-copying', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/license-ref-see-copying') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -256,7 +275,7 @@ def test_license_match_unknown_license_without_license_reference(): def test_license_match_referenced_filename(): - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-without-ref', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-without-ref') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -274,7 +293,7 @@ def test_license_match_referenced_filename(): def test_license_match_referenced_filename_unknown_ref(): - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-unknown-reference-copyright', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-unknown-reference-copyright') result_file = test_env.get_temp_file('json') args = [ '--license', @@ -293,7 +312,7 @@ def test_license_match_referenced_filename_unknown_ref(): def test_find_referenced_resource(): # Setup: Create a new scan to use for a virtual codebase - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref') scan_loc = test_env.get_temp_file('json') args = [ '--license', @@ -317,7 +336,7 @@ def test_find_referenced_resource_does_not_find_based_file_name_suffix(): # Setup: Create a new scan to use for a virtual codebase. This directory has # two test file with the same name suffix which is also a referenced # filename - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref-dupe-name-suffix', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref-dupe-name-suffix') scan_loc = test_env.get_temp_file('json') args = ['--license', '--license-text', '--license-text-diagnostics', test_dir, '--json', scan_loc] run_scan_click(args) @@ -332,7 +351,7 @@ def test_find_referenced_resource_does_not_find_based_file_name_suffix(): def test_match_reference_license(): # Setup: Create a new scan to use for a virtual codebase - test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref', copy=True) + test_dir = test_env.get_test_loc('plugin_license/license_reference/scan/scan-ref') result_file = test_env.get_temp_file('json') args = [ '--license', diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml index 64496a30b3f..325f0a70360 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml @@ -299,9 +299,9 @@ license_detections: matched_text: Public domain, written by identifier: bsd_zero_and_bsd_simplified_and_public_domain_and_bsd_new-33742a24-5ed2-ddf4-f29a-58e0cddc9766 - license_expression: gpl-3.0-plus WITH autoconf-exception-3.0 AND bsd-zero AND fsf-ap AND - gpl-2.0-plus WITH autoconf-simple-exception-2.0 AND free-unknown + gpl-2.0-plus WITH autoconf-simple-exception-2.0 license_expression_spdx: GPL-3.0-or-later WITH Autoconf-exception-3.0 AND 0BSD AND FSFAP - AND GPL-2.0-or-later WITH Autoconf-exception-generic AND LicenseRef-scancode-free-unknown + AND GPL-2.0-or-later WITH Autoconf-exception-generic matches: - license_expression: gpl-3.0-plus WITH autoconf-exception-3.0 license_expression_spdx: GPL-3.0-or-later WITH Autoconf-exception-3.0 @@ -475,7 +475,7 @@ license_detections: Copyright holders unknown, no statement of license (all of these files are part of the testsuite and do not contribute to the installed library or its headers): - identifier: gpl_3_0_plus_with_autoconf_exception_3_0_and_bsd_zero_and_fsf_ap_and_gpl_2_0_plus_with_autoconf_simple_exception_2_0_and_free_unknown-9de6335e-46f3-3ded-4a43-79d664c09328 + identifier: gpl_3_0_plus_with_autoconf_exception_3_0_and_bsd_zero_and_fsf_ap_and_gpl_2_0_plus_with_autoconf_simple_exception_2_0-9de6335e-46f3-3ded-4a43-79d664c09328 other_license_detections: [] copyright: | Copyright Thorsten Kukuk, Bjorn Esser, Zack Weinberg LGPL diff --git a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json index 2705cf55e66..c5aa756e189 100644 --- a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json +++ b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json @@ -156,11 +156,13 @@ ] }, { - "identifier": "bsd_new-9d13d609-d8f8-ab6e-b0ff-2ae14e4359b2", + "identifier": "bsd_new-68720980-08c9-ffb1-f28e-24c2e067385b", "license_expression": "bsd-new", "license_expression_spdx": "BSD-3-Clause", "detection_count": 1, - "detection_log": [], + "detection_log": [ + "unknown-reference-to-local-file" + ], "reference_matches": [ { "license_expression": "bsd-new", @@ -175,6 +177,20 @@ "rule_relevance": 100, "rule_identifier": "bsd-new_1302.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_1302.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "pypi/LICENSE.rst", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "bsd-new_89.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE" } ] }, @@ -413,10 +429,26 @@ "rule_relevance": 100, "rule_identifier": "bsd-new_1302.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_1302.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "pypi/LICENSE.rst", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "bsd-new_89.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_89.RULE" } ], - "detection_log": [], - "identifier": "bsd_new-9d13d609-d8f8-ab6e-b0ff-2ae14e4359b2" + "detection_log": [ + "unknown-reference-to-local-file" + ], + "identifier": "bsd_new-68720980-08c9-ffb1-f28e-24c2e067385b" }, { "license_expression": "bsd-new", diff --git a/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json b/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json index e260e9005ef..68a0c442df1 100644 --- a/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json +++ b/tests/packagedcode/data/license_detection/multi-flavor/jquery-form-3.51.0.expected.json @@ -74,7 +74,9 @@ "matched_text_diagnostics": "are dual licensed under the MIT and GPL licenses:\n\n* [MIT](http://malsup.github.com/mit-license.txt)\n* [GPL](http://malsup.github.com/gpl-license-v2.txt)\n\nYou may use either license. The MIT License is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.\n\nIf the GPL suits your project better you are also free to use the plugin under that license.\n\nYou don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the jQuery Form Plugin in commercial projects as long as the copyright header is left intact." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "mit_or_gpl_2_0-562fb174-abc9-da75-d29f-5bc4f1d9c56f" } ], @@ -646,7 +648,9 @@ "license_expression": "mit OR gpl-2.0", "license_expression_spdx": "MIT OR GPL-2.0-only", "detection_count": 2, - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "reference_matches": [ { "license_expression": "mit OR gpl-2.0", @@ -696,15 +700,16 @@ { "path": "README.md", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:npm/%40liferay/jquery-form@3.51.0-liferay.1?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40liferay/jquery-form@3.51.0-liferay.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit OR gpl-2.0", "detected_license_expression_spdx": "MIT OR GPL-2.0-only", "license_detections": [ @@ -729,7 +734,9 @@ "matched_text_diagnostics": "are dual licensed under the MIT and GPL licenses:\n\n* [MIT](http://malsup.github.com/mit-license.txt)\n* [GPL](http://malsup.github.com/gpl-license-v2.txt)\n\nYou may use either license. The MIT License is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.\n\nIf the GPL suits your project better you are also free to use the plugin under that license.\n\nYou don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the jQuery Form Plugin in commercial projects as long as the copyright header is left intact." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "mit_or_gpl_2_0-562fb174-abc9-da75-d29f-5bc4f1d9c56f" } ], @@ -740,6 +747,12 @@ { "path": "bower.json", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "bower", @@ -789,7 +802,9 @@ "matched_text_diagnostics": "are dual licensed under the MIT and GPL licenses:\n\n* [MIT](http://malsup.github.com/mit-license.txt)\n* [GPL](http://malsup.github.com/gpl-license-v2.txt)\n\nYou may use either license. The MIT License is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.\n\nIf the GPL suits your project better you are also free to use the plugin under that license.\n\nYou don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the jQuery Form Plugin in commercial projects as long as the copyright header is left intact." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "mit_or_gpl_2_0-562fb174-abc9-da75-d29f-5bc4f1d9c56f" } ], @@ -827,11 +842,6 @@ "pkg:bower/jquery-form@3.51.0?uuid=fixed-uid-done-for-testing-5642512d1758", "pkg:npm/%40liferay/jquery-form@3.51.0-liferay.1?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -842,6 +852,12 @@ { "path": "composer.json", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "composer", @@ -964,11 +980,6 @@ "pkg:composer/malsup/form?uuid=fixed-uid-done-for-testing-5642512d1758", "pkg:npm/%40liferay/jquery-form@3.51.0-liferay.1?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "(mit OR gpl-2.0-plus) AND gpl-2.0", "detected_license_expression_spdx": "(MIT OR GPL-2.0-or-later) AND GPL-2.0-only", "license_detections": [ @@ -1020,6 +1031,12 @@ { "path": "package.json", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "npm", @@ -1237,11 +1254,6 @@ "for_packages": [ "pkg:npm/%40liferay/jquery-form@3.51.0-liferay.1?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit OR gpl-2.0", "detected_license_expression_spdx": "MIT OR GPL-2.0-only", "license_detections": [ diff --git a/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json b/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json index cf6aa9ce82d..439243bc48e 100644 --- a/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json +++ b/tests/packagedcode/data/license_detection/reference-at-manifest/nanopb.expected.json @@ -102,11 +102,13 @@ "dependencies": [], "license_detections": [ { - "identifier": "zlib-3777cd8f-b515-8132-88be-cec12676bbaf", + "identifier": "zlib-9531c668-be8d-7a25-49eb-c18c9dcd616b", "license_expression": "zlib", "license_expression_spdx": "Zlib", - "detection_count": 1, - "detection_log": [], + "detection_count": 2, + "detection_log": [ + "unknown-reference-to-local-file" + ], "reference_matches": [ { "license_expression": "zlib", @@ -123,32 +125,6 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_in_manifest.RULE", "matched_text": " s.license = { :type => 'zlib', :file => 'LICENSE.txt' }", "matched_text_diagnostics": "type => 'zlib', :file => 'LICENSE.txt' }" - } - ] - }, - { - "identifier": "zlib-9531c668-be8d-7a25-49eb-c18c9dcd616b", - "license_expression": "zlib", - "license_expression_spdx": "Zlib", - "detection_count": 1, - "detection_log": [ - "package-unknown-reference-to-local-file" - ], - "reference_matches": [ - { - "license_expression": "zlib", - "license_expression_spdx": "Zlib", - "from_file": "nanopb/nanopb.podspec", - "start_line": 1, - "end_line": 1, - "matcher": "1-hash", - "score": 100.0, - "matched_length": 5, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "zlib_in_manifest.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_in_manifest.RULE", - "matched_text": ":type = zlib, :file = LICENSE.txt" }, { "license_expression": "zlib", @@ -356,10 +332,28 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_in_manifest.RULE", "matched_text": " s.license = { :type => 'zlib', :file => 'LICENSE.txt' }", "matched_text_diagnostics": "type => 'zlib', :file => 'LICENSE.txt' }" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "nanopb/LICENSE.txt", + "start_line": 3, + "end_line": 20, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 132, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "matched_text": "This software is provided 'as-is', without any express or \nimplied warranty. In no event will the authors be held liable \nfor any damages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you \n must not claim that you wrote the original software. If you use \n this software in a product, an acknowledgment in the product \n documentation would be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and \n must not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source \n distribution.", + "matched_text_diagnostics": "This software is provided 'as-is', without any express or \nimplied warranty. In no event will the authors be held liable \nfor any damages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you \n must not claim that you wrote the original software. If you use \n this software in a product, an acknowledgment in the product \n documentation would be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and \n must not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source \n distribution." } ], - "detection_log": [], - "identifier": "zlib-3777cd8f-b515-8132-88be-cec12676bbaf" + "detection_log": [ + "unknown-reference-to-local-file" + ], + "identifier": "zlib-9531c668-be8d-7a25-49eb-c18c9dcd616b" } ], "license_clues": [], diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2-expected.json b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2-expected.json new file mode 100644 index 00000000000..893e3e55a67 --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2-expected.json @@ -0,0 +1,872 @@ +{ + "packages": [ + { + "type": "pypi", + "namespace": null, + "name": "beartype", + "version": "0.17.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Unbearably fast runtime type checking in pure Python.\n.. # ------------------( LICENSE )------------------\n.. # Copyright (c) 2014-2024 Beartype authors.\n.. # See \"LICENSE\" for further details.\n.. #\n\n**Beartype** is an open-source pure-Python PEP-compliant near-real-time\nhybrid runtime-static third-generation type checker emphasizing efficiency,\nusability, unsubstantiated jargon we just made up, and thrilling puns.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Cecil Curry, et al.", + "email": "leycec@gmail.com", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "Cecil Curry, et al.", + "email": "leycec@gmail.com", + "url": null + } + ], + "keywords": [ + "type checking", + "type hints", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers" + ], + "homepage_url": "https://beartype.readthedocs.io", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/beartype/beartype/issues", + "code_view_url": "https://github.com/beartype/beartype", + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_mit_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": "- 'License :: OSI Approved :: MIT License'" + } + ], + "identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "license: MIT\nclassifiers:\n - 'License :: OSI Approved :: MIT License'\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": { + "Documentation": "https://beartype.readthedocs.io", + "Forums": "https://github.com/beartype/beartype/discussions", + "Releases": "https://github.com/beartype/beartype/releases", + "Download-URL": "https://github.com/beartype/beartype/archive/0.17.2.tar.gz", + "license_file": "LICENSE" + }, + "repository_homepage_url": "https://pypi.org/project/beartype", + "repository_download_url": "https://pypi.org/packages/source/b/beartype/beartype-0.17.2.tar.gz", + "api_data_url": "https://pypi.org/pypi/beartype/0.17.2/json", + "package_uid": "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "beartype-0.17.2.dist-info/METADATA" + ], + "datasource_ids": [ + "pypi_wheel_metadata" + ], + "purl": "pkg:pypi/beartype@0.17.2" + } + ], + "dependencies": [ + { + "purl": "pkg:pypi/typing-extensions", + "extracted_requirement": ">=3.10.0.0", + "scope": "all", + "is_runtime": true, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/typing-extensions?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "beartype-0.17.2.dist-info/METADATA", + "datasource_id": "pypi_wheel_metadata" + }, + { + "purl": "pkg:pypi/coverage", + "extracted_requirement": ">=5.5", + "scope": "dev", + "is_runtime": true, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/coverage?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "beartype-0.17.2.dist-info/METADATA", + "datasource_id": "pypi_wheel_metadata" + } + ], + "license_detections": [ + { + "identifier": "mit-0e83171f-f52c-747e-2310-febf0be67375", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 2, + "detection_log": [ + "unknown-reference-to-local-file" + ], + "reference_matches": [ + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "beartype-0.17.2/beartype/__init__.py", + "start_line": 4, + "end_line": 4, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_381.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_381.RULE", + "matched_text": "# See \"LICENSE\" for further details.", + "matched_text_diagnostics": "See \"LICENSE\" for further details." + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ] + }, + { + "identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_mit_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": "- 'License :: OSI Approved :: MIT License'" + } + ] + }, + { + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 11, + "end_line": 11, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": "License: MIT", + "matched_text_diagnostics": "License: MIT" + } + ] + }, + { + "identifier": "mit-9967e727-165e-9bb5-f090-7de5e47a3929", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ] + }, + { + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ] + }, + { + "identifier": "mit-e55683fd-5f52-c031-5df7-3ca3519bc260", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [ + "unknown-reference-to-local-file" + ], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 20, + "end_line": 20, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_mit_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": "Classifier: License :: OSI Approved :: MIT License", + "matched_text_diagnostics": "License :: OSI Approved :: MIT License" + }, + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 23, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_see_license_at_manifest_1.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_1.RULE", + "matched_text": "License-File: LICENSE", + "matched_text_diagnostics": "License-File: LICENSE" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ] + } + ], + "files": [ + { + "path": "beartype", + "type": "directory", + "package_data": [], + "for_packages": [], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "beartype-0.17.2.dist-info", + "type": "directory", + "package_data": [], + "for_packages": [], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "beartype-0.17.2.dist-info/LICENSE", + "type": "file", + "package_data": [], + "for_packages": [ + "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ], + "detection_log": [], + "identifier": "mit-9967e727-165e-9bb5-f090-7de5e47a3929" + } + ], + "license_clues": [], + "percentage_of_license_text": 25.0, + "scan_errors": [] + }, + { + "path": "beartype-0.17.2.dist-info/METADATA", + "type": "file", + "package_data": [ + { + "type": "pypi", + "namespace": null, + "name": "beartype", + "version": "0.17.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Unbearably fast runtime type checking in pure Python.\n.. # ------------------( LICENSE )------------------\n.. # Copyright (c) 2014-2024 Beartype authors.\n.. # See \"LICENSE\" for further details.\n.. #\n\n**Beartype** is an open-source pure-Python PEP-compliant near-real-time\nhybrid runtime-static third-generation type checker emphasizing efficiency,\nusability, unsubstantiated jargon we just made up, and thrilling puns.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Cecil Curry, et al.", + "email": "leycec@gmail.com", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "Cecil Curry, et al.", + "email": "leycec@gmail.com", + "url": null + } + ], + "keywords": [ + "type checking", + "type hints", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers" + ], + "homepage_url": "https://beartype.readthedocs.io", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/beartype/beartype/issues", + "code_view_url": "https://github.com/beartype/beartype", + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_mit_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": "- 'License :: OSI Approved :: MIT License'" + } + ], + "identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "license: MIT\nclassifiers:\n - 'License :: OSI Approved :: MIT License'\n", + "notice_text": null, + "source_packages": [], + "file_references": [ + { + "path": "beartype/__init__.py", + "size": 9331, + "sha1": null, + "md5": null, + "sha256": "20ec758584c77bdbf3d2eae4e22208c85ed6e686c91d6d2be572e00f4f10885f", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype/meta.py", + "size": 32328, + "sha1": null, + "md5": null, + "sha256": "b60a4c1f3177e1fa8bb244d0ba0f2fba9ab02df1dcaf82ca4ac0ba5814cf91ac", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype/py.typed", + "size": 0, + "sha1": null, + "md5": null, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype-0.17.2.dist-info/LICENSE", + "size": 1079, + "sha1": null, + "md5": null, + "sha256": "c3e5f3d24346a4129b6b00966361e5494376a335d4fc9eb7dbc40d886f2735f1", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype-0.17.2.dist-info/METADATA", + "size": 30452, + "sha1": null, + "md5": null, + "sha256": "20d00884cc17f1d42da09136c1826ee43730faa9aa3529dac2ccf95e29650b92", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype-0.17.2.dist-info/WHEEL", + "size": 92, + "sha1": null, + "md5": null, + "sha256": "a2241587fe4f9d033413780f762cf4f5608d9b08870cc6867abfde96a0777283", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype-0.17.2.dist-info/top_level.txt", + "size": 9, + "sha1": null, + "md5": null, + "sha256": "9f9a39a9bd5dc2b50314952aecb6ffc2fba3f30e94687604a50eba16c2a60d7d", + "sha512": null, + "extra_data": {} + }, + { + "path": "beartype-0.17.2.dist-info/RECORD", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "extra_data": {} + } + ], + "is_private": false, + "is_virtual": false, + "extra_data": { + "Documentation": "https://beartype.readthedocs.io", + "Forums": "https://github.com/beartype/beartype/discussions", + "Releases": "https://github.com/beartype/beartype/releases", + "Download-URL": "https://github.com/beartype/beartype/archive/0.17.2.tar.gz", + "license_file": "LICENSE" + }, + "dependencies": [ + { + "purl": "pkg:pypi/typing-extensions", + "extracted_requirement": ">=3.10.0.0", + "scope": "all", + "is_runtime": true, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:pypi/coverage", + "extracted_requirement": ">=5.5", + "scope": "dev", + "is_runtime": true, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://pypi.org/project/beartype", + "repository_download_url": "https://pypi.org/packages/source/b/beartype/beartype-0.17.2.tar.gz", + "api_data_url": "https://pypi.org/pypi/beartype/0.17.2/json", + "datasource_id": "pypi_wheel_metadata", + "purl": "pkg:pypi/beartype@0.17.2" + } + ], + "for_packages": [ + "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 11, + "end_line": 11, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": "License: MIT", + "matched_text_diagnostics": "License: MIT" + } + ], + "detection_log": [], + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 20, + "end_line": 20, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_mit_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE", + "matched_text": "Classifier: License :: OSI Approved :: MIT License", + "matched_text_diagnostics": "License :: OSI Approved :: MIT License" + }, + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 23, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_see_license_at_manifest_1.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see_license_at_manifest_1.RULE", + "matched_text": "License-File: LICENSE", + "matched_text_diagnostics": "License-File: LICENSE" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ], + "detection_log": [ + "unknown-reference-to-local-file" + ], + "identifier": "mit-e55683fd-5f52-c031-5df7-3ca3519bc260" + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/METADATA", + "start_line": 31, + "end_line": 31, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_381.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_381.RULE", + "matched_text": ".. # See \"LICENSE\" for further details.", + "matched_text_diagnostics": "See \"LICENSE\" for further details." + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ], + "detection_log": [ + "unknown-reference-to-local-file" + ], + "identifier": "mit-0e83171f-f52c-747e-2310-febf0be67375" + } + ], + "license_clues": [], + "percentage_of_license_text": 7.28, + "scan_errors": [] + }, + { + "path": "beartype-0.17.2.dist-info/RECORD", + "type": "file", + "package_data": [], + "for_packages": [ + "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "beartype-0.17.2.dist-info/WHEEL", + "type": "file", + "package_data": [], + "for_packages": [ + "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "beartype-0.17.2.dist-info/top_level.txt", + "type": "file", + "package_data": [], + "for_packages": [ + "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "beartype/__init__.py", + "type": "file", + "package_data": [], + "for_packages": [ + "pkg:pypi/beartype@0.17.2?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "beartype-0.17.2/beartype/__init__.py", + "start_line": 4, + "end_line": 4, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_381.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_381.RULE", + "matched_text": "# See \"LICENSE\" for further details.", + "matched_text_diagnostics": "See \"LICENSE\" for further details." + }, + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License", + "matched_text_diagnostics": "MIT License" + } + ], + "detection_log": [ + "unknown-reference-to-local-file" + ], + "identifier": "mit-0e83171f-f52c-747e-2310-febf0be67375" + } + ], + "license_clues": [], + "percentage_of_license_text": 15.62, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE new file mode 100644 index 00000000000..12bd9d4b922 --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/LICENSE @@ -0,0 +1,3 @@ +MIT License + +Copyright (c) 2014-2024 Beartype authors. \ No newline at end of file diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/METADATA b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/METADATA new file mode 100644 index 00000000000..4f108bb798f --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/METADATA @@ -0,0 +1,36 @@ +Metadata-Version: 2.1 +Name: beartype +Version: 0.17.2 +Summary: Unbearably fast runtime type checking in pure Python. +Home-page: https://beartype.readthedocs.io +Download-URL: https://github.com/beartype/beartype/archive/0.17.2.tar.gz +Author: Cecil Curry, et al. +Author-email: leycec@gmail.com +Maintainer: Cecil Curry, et al. +Maintainer-email: leycec@gmail.com +License: MIT +Project-URL: Documentation, https://beartype.readthedocs.io +Project-URL: Source, https://github.com/beartype/beartype +Project-URL: Issues, https://github.com/beartype/beartype/issues +Project-URL: Forums, https://github.com/beartype/beartype/discussions +Project-URL: Releases, https://github.com/beartype/beartype/releases +Keywords: type checking,type hints +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Requires-Python: >=3.8.0 +Description-Content-Type: text/x-rst; charset=UTF-8 +License-File: LICENSE +Provides-Extra: all +Requires-Dist: typing-extensions >=3.10.0.0 ; extra == 'all' +Provides-Extra: dev +Requires-Dist: coverage >=5.5 ; extra == 'dev' + +.. # ------------------( LICENSE )------------------ +.. # Copyright (c) 2014-2024 Beartype authors. +.. # See "LICENSE" for further details. +.. # + +**Beartype** is an open-source pure-Python PEP-compliant near-real-time +hybrid runtime-static third-generation type checker emphasizing efficiency, +usability, unsubstantiated jargon we just made up, and thrilling puns. diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/RECORD b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/RECORD new file mode 100644 index 00000000000..90beddb9753 --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/RECORD @@ -0,0 +1,8 @@ +beartype/__init__.py,sha256=IOx1hYTHe9vz0urk4iIIyF7W5obJHW0r5XLgD08QiF8,9331 +beartype/meta.py,sha256=tgpMHzF34fqLskTQug8vupqwLfHcr4LKSsC6WBTPkaw,32328 +beartype/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +beartype-0.17.2.dist-info/LICENSE,sha256=w-Xz0kNGpBKbawCWY2HlSUN2ozXU_J6328QNiG8nNfE,1079 +beartype-0.17.2.dist-info/METADATA,sha256=INAIhMwX8dQtoJE2wYJu5Dcw-qmqNSnawsz5XillC5I,30452 +beartype-0.17.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92 +beartype-0.17.2.dist-info/top_level.txt,sha256=n5o5qb1dwrUDFJUq7Lb_wvuj8w6UaHYEpQ66FsKmDX0,9 +beartype-0.17.2.dist-info/RECORD,, diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/WHEEL b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/WHEEL new file mode 100644 index 00000000000..98c0d20b7a6 --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.42.0) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/top_level.txt b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/top_level.txt new file mode 100644 index 00000000000..e370cca7d3e --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype-0.17.2.dist-info/top_level.txt @@ -0,0 +1 @@ +beartype diff --git a/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype/__init__.py b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype/__init__.py new file mode 100644 index 00000000000..8bd4708b008 --- /dev/null +++ b/tests/packagedcode/data/license_detection/reference-to-license-beside-manifest/beartype-0.17.2/beartype/__init__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 +# --------------------( LICENSE )-------------------- +# Copyright (c) 2014-2024 Beartype authors. +# See "LICENSE" for further details. + +from beartype.meta import VERSION as __version__ +from beartype.meta import VERSION_PARTS as __version_info__ diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json index 6da2af096b7..55b6a576028 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json @@ -720,33 +720,6 @@ } ] }, - { - "identifier": "apache_2_0-4571361c-d5af-4e7e-c015-6cc10c1b8174", - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "detection_count": 2, - "detection_log": [ - "extra-words" - ], - "reference_matches": [ - { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "from_file": "paddlenlp/README_en.md", - "start_line": 6, - "end_line": 8, - "matcher": "2-aho", - "score": 90.91, - "matched_length": 10, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_1374.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1374.RULE", - "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", - "matched_text_diagnostics": "License\n\n[PaddleNLP] is provided under the [Apache-2.0 License](./LICENSE)." - } - ] - }, { "identifier": "apache_2_0-999670be-3d5e-ebf8-ae18-b555c26c5e80", "license_expression": "apache-2.0", @@ -824,6 +797,49 @@ } ] }, + { + "identifier": "apache_2_0-dab3668b-f1a2-1e23-c126-6a837727ab11", + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "detection_count": 2, + "detection_log": [ + "unknown-reference-to-local-file" + ], + "reference_matches": [ + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 6, + "end_line": 8, + "matcher": "2-aho", + "score": 90.91, + "matched_length": 10, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_1374.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1374.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] is provided under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" + } + ] + }, { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", @@ -1024,12 +1040,28 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1374.RULE", "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", "matched_text_diagnostics": "License\n\n[PaddleNLP] is provided under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [ - "extra-words" + "unknown-reference-to-local-file" ], - "identifier": "apache_2_0-4571361c-d5af-4e7e-c015-6cc10c1b8174" + "identifier": "apache_2_0-dab3668b-f1a2-1e23-c126-6a837727ab11" } ], "license_clues": [], @@ -1579,12 +1611,28 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1374.RULE", "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", "matched_text_diagnostics": "License\n\n[PaddleNLP] is provided under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [ - "extra-words" + "unknown-reference-to-local-file" ], - "identifier": "apache_2_0-4571361c-d5af-4e7e-c015-6cc10c1b8174" + "identifier": "apache_2_0-dab3668b-f1a2-1e23-c126-6a837727ab11" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json b/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json index eeede11edf8..e8e748a6c6c 100644 --- a/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json +++ b/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json @@ -608,7 +608,7 @@ ], "license_detections": [ { - "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de", + "identifier": "apache_2_0-377d4d9a-1f89-3c3b-5fae-46bd8ceb8ff5", "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "detection_count": 4, @@ -626,6 +626,20 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_2.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "htrace-core-4.0.0-incubating/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matcher": "2-aho", + "score": 95.0, + "matched_length": 14, + "match_coverage": 100.0, + "rule_relevance": 95, + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE" } ] }, @@ -1410,9 +1424,26 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_2.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "htrace-core-4.0.0-incubating/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matcher": "2-aho", + "score": 95.0, + "matched_length": 14, + "match_coverage": 100.0, + "rule_relevance": 95, + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE" } ], - "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de" + "identifier": "apache_2_0-377d4d9a-1f89-3c3b-5fae-46bd8ceb8ff5", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "other_license_expression": null, @@ -1515,9 +1546,26 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_2.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "htrace-core-4.0.0-incubating/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matcher": "2-aho", + "score": 95.0, + "matched_length": 14, + "match_coverage": 100.0, + "rule_relevance": 95, + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE" } ], - "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de" + "identifier": "apache_2_0-377d4d9a-1f89-3c3b-5fae-46bd8ceb8ff5", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1600,9 +1648,26 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_2.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "htrace-core-4.0.0-incubating/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matcher": "2-aho", + "score": 95.0, + "matched_length": 14, + "match_coverage": 100.0, + "rule_relevance": 95, + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE" } ], - "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de" + "identifier": "apache_2_0-377d4d9a-1f89-3c3b-5fae-46bd8ceb8ff5", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "other_license_expression": null, @@ -1694,9 +1759,26 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_2.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "htrace-core-4.0.0-incubating/META-INF/NOTICE", + "start_line": 5, + "end_line": 6, + "matcher": "2-aho", + "score": 95.0, + "matched_length": 14, + "match_coverage": 100.0, + "rule_relevance": 95, + "rule_identifier": "apache-2.0_product_includes_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_product_includes_2.RULE" } ], - "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de" + "identifier": "apache_2_0-377d4d9a-1f89-3c3b-5fae-46bd8ceb8ff5", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], diff --git a/tests/packagedcode/data/plugin/com-package-expected.json b/tests/packagedcode/data/plugin/com-package-expected.json index 70709a1ec11..49dd039de15 100644 --- a/tests/packagedcode/data/plugin/com-package-expected.json +++ b/tests/packagedcode/data/plugin/com-package-expected.json @@ -38,36 +38,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "chcp.com", - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/plugin/mui-package-expected.json b/tests/packagedcode/data/plugin/mui-package-expected.json index d00ea043529..6c1be9e1bb8 100644 --- a/tests/packagedcode/data/plugin/mui-package-expected.json +++ b/tests/packagedcode/data/plugin/mui-package-expected.json @@ -38,36 +38,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "clfs.sys.mui", - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/plugin/mun-package-expected.json b/tests/packagedcode/data/plugin/mun-package-expected.json index 72a5fb4810c..c582049987a 100644 --- a/tests/packagedcode/data/plugin/mun-package-expected.json +++ b/tests/packagedcode/data/plugin/mun-package-expected.json @@ -38,36 +38,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "crypt32.dll.mun", - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/plugin/sys-package-expected.json b/tests/packagedcode/data/plugin/sys-package-expected.json index b260d4e50c4..a770e312b69 100644 --- a/tests/packagedcode/data/plugin/sys-package-expected.json +++ b/tests/packagedcode/data/plugin/sys-package-expected.json @@ -38,36 +38,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "tbs.sys", - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/plugin/tlb-package-expected.json b/tests/packagedcode/data/plugin/tlb-package-expected.json index 98a62e59288..190e3142067 100644 --- a/tests/packagedcode/data/plugin/tlb-package-expected.json +++ b/tests/packagedcode/data/plugin/tlb-package-expected.json @@ -38,36 +38,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "stdole2.tlb", - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/plugin/win_pe-package-expected.json b/tests/packagedcode/data/plugin/win_pe-package-expected.json index 6af58be0d4b..90cc903b1dd 100644 --- a/tests/packagedcode/data/plugin/win_pe-package-expected.json +++ b/tests/packagedcode/data/plugin/win_pe-package-expected.json @@ -67,7 +67,7 @@ "other_license_expression": null, "other_license_expression_spdx": null, "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: \u00a9 2009 Ian F. Darwin\nLegalTrademarks: GnuWin32\u00ae, File\u00ae, file\u00ae\nLicense: 'Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software\n written by Ian F. Darwin and others; maintained 1994-2004 Christos Zoulas. This software is\n not subject to any export provision of the United States Department of Commerce, and may be\n exported to any country or planet. Redistribution and use in source and binary forms, with\n or without modification, are permitted provided that the following conditions are met: 1.\n Redistributions of source code must retain the above copyright notice immediately at the beginning\n of the file, without modification, this list of conditions, and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice, this list of\n conditions and the following disclaimer in the documentation and/or other materials provided\n with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''''\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL\n THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\n OF SUCH DAMAGE.'\n", + "extracted_license_statement": "LegalTrademarks: GnuWin32\u00ae, File\u00ae, file\u00ae\nLicense: 'Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software\n written by Ian F. Darwin and others; maintained 1994-2004 Christos Zoulas. This software is\n not subject to any export provision of the United States Department of Commerce, and may be\n exported to any country or planet. Redistribution and use in source and binary forms, with\n or without modification, are permitted provided that the following conditions are met: 1.\n Redistributions of source code must retain the above copyright notice immediately at the beginning\n of the file, without modification, this list of conditions, and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice, this list of\n conditions and the following disclaimer in the documentation and/or other materials provided\n with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''''\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL\n THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\n OF SUCH DAMAGE.'\n", "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/plugin/winmd-package-expected.json b/tests/packagedcode/data/plugin/winmd-package-expected.json index 062e1846fad..058afb68e20 100644 --- a/tests/packagedcode/data/plugin/winmd-package-expected.json +++ b/tests/packagedcode/data/plugin/winmd-package-expected.json @@ -38,36 +38,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "Windows.AI.winmd", - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/rpm_installed/mariner/scan.expected.json b/tests/packagedcode/data/rpm_installed/mariner/scan.expected.json index a7c4babb936..3582b40515e 100644 --- a/tests/packagedcode/data/rpm_installed/mariner/scan.expected.json +++ b/tests/packagedcode/data/rpm_installed/mariner/scan.expected.json @@ -565,7 +565,9 @@ "matched_text_diagnostics": "The OpenSSL toolkit stays under a double license, i.e. both the conditions of\nthe OpenSSL License and the original SSLeay license apply to the toolkit." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "openssl_ssleay-dc6d828d-629e-dcb5-0545-6a4248d1411c" } ], @@ -1365,7 +1367,9 @@ "matched_text_diagnostics": "The OpenSSL toolkit stays under a double license, i.e. both the conditions of\nthe OpenSSL License and the original SSLeay license apply to the toolkit." } ], - "detection_log": [], + "detection_log": [ + "imperfect-match-coverage" + ], "identifier": "openssl_ssleay-dc6d828d-629e-dcb5-0545-6a4248d1411c" } ], diff --git a/tests/packagedcode/data/win_pe/DockerPull.exe.expected.json b/tests/packagedcode/data/win_pe/DockerPull.exe.expected.json new file mode 100644 index 00000000000..779381399f5 --- /dev/null +++ b/tests/packagedcode/data/win_pe/DockerPull.exe.expected.json @@ -0,0 +1,23 @@ +{ + "Full Version": null, + "ProductVersion": "1.0.7.0", + "FileVersion": "1.0.7.0", + "Assembly Version": null, + "BuildDate": null, + "ProductName": "DockerPull", + "OriginalFilename": "DockerPull.exe", + "InternalName": "DockerPull", + "License": null, + "LegalCopyright": "MIT License | GitHub: https://github.com/topcss/docker-pull-tar", + "LegalTrademarks": null, + "LegalTrademarks1": null, + "LegalTrademarks2": null, + "LegalTrademarks3": null, + "FileDescription": "Docker Image Puller \u65e0\u9700\u5b89\u88c5 Docker \u6216 Python \u73af\u5883,\u76f4\u63a5\u4ece Docker \u4ed3\u5e93\u62c9\u53d6\u955c\u50cf,\u652f\u6301\u56fd\u5185\u955c\u50cf\u6e90\u52a0\u901f\u548c\u591a\u67b6\u6784\u652f\u6301\u3002\u9879\u76ee\u5730\u5740:https://github.com/topcss/docker-pull-tar", + "Comments": null, + "CompanyName": "topcss", + "Company": null, + "URL": null, + "WWW": null, + "extra_data": {} +} \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/DockerPull.exe.package-expected.json b/tests/packagedcode/data/win_pe/DockerPull.exe.package-expected.json new file mode 100644 index 00000000000..dd5c3f2907b --- /dev/null +++ b/tests/packagedcode/data/win_pe/DockerPull.exe.package-expected.json @@ -0,0 +1,75 @@ +{ + "type": "winexe", + "namespace": null, + "name": "DockerPull", + "version": "1.0.7.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Docker Image Puller \u65e0\u9700\u5b89\u88c5 Docker \u6216 Python \u73af\u5883,\u76f4\u63a5\u4ece Docker \u4ed3\u5e93\u62c9\u53d6\u955c\u50cf,\u652f\u6301\u56fd\u5185\u955c\u50cf\u6e90\u52a0\u901f\u548c\u591a\u67b6\u6784\u652f\u6301\u3002\u9879\u76ee\u5730\u5740:https://github.com/topcss/docker-pull-tar", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "topcss", + "email": null, + "url": null + } + ], + "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": "MIT License | GitHub: https://github.com/topcss/docker-pull-tar", + "holder": "MIT License | GitHub: https://github.com/topcss/docker-pull-tar", + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": null, + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_14.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT License | GitHub: https://github.com/topcss/docker-pull-tar" + } + ], + "identifier": "mit-9967e727-165e-9bb5-f090-7de5e47a3929" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "LegalCopyright: 'MIT License | GitHub: https://github.com/topcss/docker-pull-tar'\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "windows_executable", + "purl": "pkg:winexe/DockerPull@1.0.7.0" +} \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json index adbc1a7b5d0..98b854693e5 100644 --- a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 83.33, - "matched_length": 5, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "matched_text": "license {'LegalCopyright': None, 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-3a74427e-26a2-7b3f-eb84-9b610c013417" - } - ], + "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": "LegalCopyright:\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json index 53e1e617709..539aaa5a968 100644 --- a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 83.33, - "matched_length": 5, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "matched_text": "license {'LegalCopyright': None, 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-3a74427e-26a2-7b3f-eb84-9b610c013417" - } - ], + "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": "LegalCopyright:\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json b/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json index 435abe665f3..baa15878c55 100644 --- a/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json +++ b/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json index e859d3f2715..63ab56a5300 100644 --- a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json +++ b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json @@ -23,36 +23,13 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 83.33, - "matched_length": 5, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "matched_text": "license {'LegalCopyright': None, 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-3a74427e-26a2-7b3f-eb84-9b610c013417" - } - ], + "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": "LegalCopyright:\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/chcp.com.package-expected.json b/tests/packagedcode/data/win_pe/chcp.com.package-expected.json index 79df3de0d36..8c504794fbd 100644 --- a/tests/packagedcode/data/win_pe/chcp.com.package-expected.json +++ b/tests/packagedcode/data/win_pe/chcp.com.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json b/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json index 5fad3ef1f64..69a8b7fbbf7 100644 --- a/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json +++ b/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json b/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json index 640cd82102e..46060e5326e 100644 --- a/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json +++ b/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json b/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json index e859d3f2715..63ab56a5300 100644 --- a/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json +++ b/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json @@ -23,36 +23,13 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 83.33, - "matched_length": 5, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-679f097d28658555700ef170738adb0fd7151fce", - "matched_text": "license {'LegalCopyright': None, 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-3a74427e-26a2-7b3f-eb84-9b610c013417" - } - ], + "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": "LegalCopyright:\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/file.exe.package-expected.json b/tests/packagedcode/data/win_pe/file.exe.package-expected.json index 882be759ef6..5783bc6921a 100644 --- a/tests/packagedcode/data/win_pe/file.exe.package-expected.json +++ b/tests/packagedcode/data/win_pe/file.exe.package-expected.json @@ -60,7 +60,7 @@ "other_license_expression": null, "other_license_expression_spdx": null, "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: \u00a9 2009 Ian F. Darwin\nLegalTrademarks: GnuWin32\u00ae, File\u00ae, file\u00ae\nLicense: 'Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software\n written by Ian F. Darwin and others; maintained 1994-2004 Christos Zoulas. This software is\n not subject to any export provision of the United States Department of Commerce, and may be\n exported to any country or planet. Redistribution and use in source and binary forms, with\n or without modification, are permitted provided that the following conditions are met: 1.\n Redistributions of source code must retain the above copyright notice immediately at the beginning\n of the file, without modification, this list of conditions, and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice, this list of\n conditions and the following disclaimer in the documentation and/or other materials provided\n with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''''\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL\n THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\n OF SUCH DAMAGE.'\n", + "extracted_license_statement": "LegalTrademarks: GnuWin32\u00ae, File\u00ae, file\u00ae\nLicense: 'Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software\n written by Ian F. Darwin and others; maintained 1994-2004 Christos Zoulas. This software is\n not subject to any export provision of the United States Department of Commerce, and may be\n exported to any country or planet. Redistribution and use in source and binary forms, with\n or without modification, are permitted provided that the following conditions are met: 1.\n Redistributions of source code must retain the above copyright notice immediately at the beginning\n of the file, without modification, this list of conditions, and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice, this list of\n conditions and the following disclaimer in the documentation and/or other materials provided\n with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''''\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL\n THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\n OF SUCH DAMAGE.'\n", "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json b/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json index 4cb14419292..5516c312276 100644 --- a/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json @@ -60,7 +60,7 @@ "other_license_expression": null, "other_license_expression_spdx": null, "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: \u00a9 2004 Free Software Foundation \nLegalTrademarks: GNU\u00ae, LibIconv\u00ae, libiconv2\u00ae\nLicense: This program is free software; you can redistribute it and/or modify it under the terms\n of the GNU Lesser General Public License;see www.gnu.org/copyleft/lesser.html.\n", + "extracted_license_statement": "LegalTrademarks: GNU\u00ae, LibIconv\u00ae, libiconv2\u00ae\nLicense: This program is free software; you can redistribute it and/or modify it under the terms\n of the GNU Lesser General Public License;see www.gnu.org/copyleft/lesser.html.\n", "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json b/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json index 54e0b220c51..ebc5c10d04a 100644 --- a/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json @@ -60,7 +60,7 @@ "other_license_expression": null, "other_license_expression_spdx": null, "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: \u00a9 2005 Free Software Foundation \nLegalTrademarks: GNU\u00ae, GetText\u00ae, libintl3\u00ae\nLicense: This program is free software; you can redistribute it and/or modify it under the terms\n of the GNU General Public License;see www.gnu.org/copyleft/gpl.html.\n", + "extracted_license_statement": "LegalTrademarks: GNU\u00ae, GetText\u00ae, libintl3\u00ae\nLicense: This program is free software; you can redistribute it and/or modify it under the terms\n of the GNU General Public License;see www.gnu.org/copyleft/gpl.html.\n", "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/onixcheck.exe.expected.json b/tests/packagedcode/data/win_pe/onixcheck.exe.expected.json new file mode 100644 index 00000000000..c6f16adfdde --- /dev/null +++ b/tests/packagedcode/data/win_pe/onixcheck.exe.expected.json @@ -0,0 +1,23 @@ +{ + "Full Version": null, + "ProductVersion": "0.9.7 (2021-09-29)", + "FileVersion": "0.9.7 (2021-09-29)", + "Assembly Version": null, + "BuildDate": null, + "ProductName": "onixcheck", + "OriginalFilename": "onixcheck.exe", + "InternalName": "onixcheck.exe", + "License": null, + "LegalCopyright": "\u00a9 2016-2021 Titusz Pan", + "LegalTrademarks": null, + "LegalTrademarks1": null, + "LegalTrademarks2": null, + "LegalTrademarks3": null, + "FileDescription": "Validate ONIX for Books XML files", + "Comments": null, + "CompanyName": "Craft AG https://craft.de", + "Company": null, + "URL": null, + "WWW": null, + "extra_data": {} +} \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/onixcheck.exe.package-expected.json b/tests/packagedcode/data/win_pe/onixcheck.exe.package-expected.json new file mode 100644 index 00000000000..64ca727d970 --- /dev/null +++ b/tests/packagedcode/data/win_pe/onixcheck.exe.package-expected.json @@ -0,0 +1,52 @@ +{ + "type": "winexe", + "namespace": null, + "name": "onixcheck", + "version": "0.9.7 (2021-09-29)", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Validate ONIX for Books XML files", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Craft AG https://craft.de", + "email": null, + "url": null + } + ], + "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": "\u00a9 2016-2021 Titusz Pan", + "holder": "Titusz Pan", + "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": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "windows_executable", + "purl": "pkg:winexe/onixcheck@0.9.7%20%282021-09-29%29" +} \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json b/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json index 58df2808e7c..a5aba8ade76 100644 --- a/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json +++ b/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json b/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json index 2ecf708ce1a..b7b3e578b5e 100644 --- a/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json +++ b/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json @@ -31,36 +31,13 @@ "vcs_url": null, "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", "holder": "Microsoft Corporation", - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": null, - "start_line": 1, - "end_line": 1, - "matcher": "5-undetected", - "score": 90.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-33f1f14c9c3aed427a1ebff42fd03640ebc75225", - "matched_text": "license {'LegalCopyright': '\u00a9 Microsoft Corporation. All rights reserved.', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-7a4e31a4-3c62-cfda-29ff-b00424060fd7" - } - ], + "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": "LegalCopyright: \u00a9 Microsoft Corporation. All rights reserved.\nLegalTrademarks:\nLicense:\n", + "extracted_license_statement": null, "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json b/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json index 8ec1bd20680..fe06e73db20 100644 --- a/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json @@ -60,7 +60,7 @@ "other_license_expression": null, "other_license_expression_spdx": null, "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: \u00a9 2008 Ville Laurikari \nLegalTrademarks: GnuWin32\u00ae, Tre\u00ae, tre4\u00ae\nLicense: This program is free software; you can redistribute it and/or modify it under the terms\n of the GNU General Public License; see www.gnu.org/copyleft/gpl.html.\n", + "extracted_license_statement": "LegalTrademarks: GnuWin32\u00ae, Tre\u00ae, tre4\u00ae\nLicense: This program is free software; you can redistribute it and/or modify it under the terms\n of the GNU General Public License; see www.gnu.org/copyleft/gpl.html.\n", "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/data/win_pe/youtube-dlc.exe.expected.json b/tests/packagedcode/data/win_pe/youtube-dlc.exe.expected.json new file mode 100644 index 00000000000..dbc86b5296a --- /dev/null +++ b/tests/packagedcode/data/win_pe/youtube-dlc.exe.expected.json @@ -0,0 +1,23 @@ +{ + "Full Version": null, + "ProductVersion": "2020.10.09-1 | git.io/JUGsM", + "FileVersion": "2020.10.09-1", + "Assembly Version": null, + "BuildDate": null, + "ProductName": "Youtube-dlc", + "OriginalFilename": "youtube-dlc.exe", + "InternalName": "youtube-dlc", + "License": null, + "LegalCopyright": "theidel@uni-bremen.de | UNLICENSE", + "LegalTrademarks": null, + "LegalTrademarks1": null, + "LegalTrademarks2": null, + "LegalTrademarks3": null, + "FileDescription": "Media Downloader", + "Comments": "Youtube-dlc Command Line Interface.", + "CompanyName": "theidel@uni-bremen.de", + "Company": null, + "URL": null, + "WWW": null, + "extra_data": {} +} \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/youtube-dlc.exe.package-expected.json b/tests/packagedcode/data/win_pe/youtube-dlc.exe.package-expected.json new file mode 100644 index 00000000000..6128cc3720d --- /dev/null +++ b/tests/packagedcode/data/win_pe/youtube-dlc.exe.package-expected.json @@ -0,0 +1,75 @@ +{ + "type": "winexe", + "namespace": null, + "name": "Youtube-dlc", + "version": "2020.10.09-1 | git.io/JUGsM", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Media Downloader\nYoutube-dlc Command Line Interface.", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "theidel@uni-bremen.de", + "email": null, + "url": null + } + ], + "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": "theidel@uni-bremen.de | UNLICENSE", + "holder": "theidel@uni-bremen.de", + "declared_license_expression": "unlicense", + "declared_license_expression_spdx": "Unlicense", + "license_detections": [ + { + "license_expression": "unlicense", + "license_expression_spdx": "Unlicense", + "matches": [ + { + "license_expression": "unlicense", + "license_expression_spdx": "Unlicense", + "from_file": null, + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 50.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 50, + "rule_identifier": "spdx_license_id_unlicense_for_unlicense.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_unlicense_for_unlicense.RULE", + "matched_text": "theidel@uni-bremen.de | UNLICENSE" + } + ], + "identifier": "unlicense-0d6030cd-b503-421f-782c-df98d6b478a2" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "LegalCopyright: theidel@uni-bremen.de | UNLICENSE\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "windows_executable", + "purl": "pkg:winexe/Youtube-dlc@2020.10.09-1%20%7C%20git.io/JUGsM" +} \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json b/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json index 9a507aa3aa4..8b1c82f62b6 100644 --- a/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json @@ -82,7 +82,7 @@ "other_license_expression": null, "other_license_expression_spdx": null, "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: \u00a9 2006 Jean-loup Gailly , Mark Adler \nLegalTrademarks: GnuWin32\u00ae, Zlib\u00ae, zlib1\u00ae\nLicense: '(C) 1995-2002 Jean-loup Gailly and Mark Adler This software is provided ''as-is'',\n without any express or implied warranty. In no event will the authors be held liable for any\n damages arising from the use of this software. Permission is granted to anyone to use this\n software for any purpose, including commercial applications, and to alter it and redistribute\n it freely, subject to the following restrictions: 1. The origin of this software must not\n be misrepresented; you must not claim that you wrote the original software. If you use this\n software in a product, an acknowledgment in the product documentation would be appreciated\n but is not required. 2. Altered source versions must be plainly marked as such, and must not\n be misrepresented as being the original software. 3. This notice may not be removed or altered\n from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu'\n", + "extracted_license_statement": "LegalTrademarks: GnuWin32\u00ae, Zlib\u00ae, zlib1\u00ae\nLicense: '(C) 1995-2002 Jean-loup Gailly and Mark Adler This software is provided ''as-is'',\n without any express or implied warranty. In no event will the authors be held liable for any\n damages arising from the use of this software. Permission is granted to anyone to use this\n software for any purpose, including commercial applications, and to alter it and redistribute\n it freely, subject to the following restrictions: 1. The origin of this software must not\n be misrepresented; you must not claim that you wrote the original software. If you use this\n software in a product, an acknowledgment in the product documentation would be appreciated\n but is not required. 2. Altered source versions must be plainly marked as such, and must not\n be misrepresented as being the original software. 3. This notice may not be removed or altered\n from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu'\n", "notice_text": null, "source_packages": [], "file_references": [], diff --git a/tests/packagedcode/test_license_detection.py b/tests/packagedcode/test_license_detection.py index f4bbf54094d..cbdd7ee04af 100644 --- a/tests/packagedcode/test_license_detection.py +++ b/tests/packagedcode/test_license_detection.py @@ -338,3 +338,21 @@ def test_license_package_multi_flavored(): run_scan_click(args) test_loc = test_env.get_test_loc('license_detection/multi-flavor/jquery-form-3.51.0.expected.json') check_json_scan(test_loc, result_file, regen=REGEN_TEST_FIXTURES) + +def test_license_reference_to_file_beside_package_manifest(): + test_dir = test_env.get_test_loc('license_detection/reference-to-license-beside-manifest/beartype-0.17.2/') + result_file = test_env.get_temp_file('json') + args = [ + '--license', + '--license-text', + '--license-text-diagnostics', + '--license-diagnostics', + '--package', + '--strip-root', + '--verbose', + '--json', result_file, + test_dir, + ] + run_scan_click(args) + test_loc = test_env.get_test_loc('license_detection/reference-to-license-beside-manifest/beartype-0.17.2-expected.json') + check_json_scan(test_loc, result_file, regen=REGEN_TEST_FIXTURES) diff --git a/tests/packagedcode/test_win_pe.py b/tests/packagedcode/test_win_pe.py index 7da4f65f72b..14ede020b80 100644 --- a/tests/packagedcode/test_win_pe.py +++ b/tests/packagedcode/test_win_pe.py @@ -112,3 +112,45 @@ def get_results(self, test_file): for manifest in win_pe.WindowsExecutableHandler.parse(test_file): package_data.append(manifest.to_dict()) return package_data + + +class TestWinPeInfoParseToPackage(FileBasedTesting): + """ + Test packagedata creation without the .exe file just from + the extracted pe info JSON. To extract the PE package info + add a test in TestWinPePeInfo and regen, then transfer the + function into this class, with necessary modifications. + """ + test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + + pe_expected_file_suffix = '.expected.json' + package_expected_file_suffix = '.package-expected.json' + + def get_packages_data_from_pe_info(self, pe_info_file): + with io.open(pe_info_file, encoding='utf-8') as expect: + pe_info = json.load(expect) + return win_pe.get_package_data_from_pe_info(pe_info).to_dict() + + def check_win_pe(self, test_file, regen=REGEN_TEST_FIXTURES): + package_expected_file = test_file.replace(self.pe_expected_file_suffix, self.package_expected_file_suffix) + package_data = self.get_packages_data_from_pe_info(test_file) + if regen: + with open(package_expected_file, 'w') as out: + json.dump(package_data, out, indent=2) + + with io.open(package_expected_file, encoding='utf-8') as expect: + expected = json.load(expect) + + assert package_data == expected + + def test_win_pe_youtube_dlc_exe(self): + test_file = self.get_test_loc('win_pe/youtube-dlc.exe'+self.pe_expected_file_suffix) + self.check_win_pe(test_file, regen=REGEN_TEST_FIXTURES) + + def test_win_pe_dockerpull_exe(self): + test_file = self.get_test_loc('win_pe/DockerPull.exe'+self.pe_expected_file_suffix) + self.check_win_pe(test_file, regen=REGEN_TEST_FIXTURES) + + def test_win_pe_onixcheck_exe(self): + test_file = self.get_test_loc('win_pe/onixcheck.exe'+self.pe_expected_file_suffix) + self.check_win_pe(test_file, regen=REGEN_TEST_FIXTURES) diff --git a/tests/summarycode/data/classify/cli.expected.json b/tests/summarycode/data/classify/cli.expected.json index a44599bb3d1..cd4f7e90d9f 100644 --- a/tests/summarycode/data/classify/cli.expected.json +++ b/tests/summarycode/data/classify/cli.expected.json @@ -25,6 +25,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "files_count": 8, "dirs_count": 1, "size_count": 0, @@ -55,6 +56,7 @@ "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -85,6 +87,7 @@ "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -115,6 +118,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -145,6 +149,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -175,6 +180,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "files_count": 2, "dirs_count": 0, "size_count": 0, @@ -205,6 +211,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -235,6 +242,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -265,6 +273,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -295,6 +304,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "files_count": 0, "dirs_count": 0, "size_count": 0, diff --git a/tests/summarycode/data/classify/with_package_data.expected.json b/tests/summarycode/data/classify/with_package_data.expected.json index e99c6bbd30d..5457095ea4c 100644 --- a/tests/summarycode/data/classify/with_package_data.expected.json +++ b/tests/summarycode/data/classify/with_package_data.expected.json @@ -232,15 +232,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 7, "dirs_count": 7, "size_count": 31701, @@ -266,15 +267,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 5, "dirs_count": 3, "size_count": 27441, @@ -300,15 +302,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -334,15 +337,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -368,6 +372,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": true, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [ { "type": "jar", @@ -422,11 +432,6 @@ "for_packages": [ "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": true, - "is_readme": false, - "is_top_level": true, - "is_key_file": true, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -452,15 +457,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 2, "dirs_count": 2, "size_count": 15229, @@ -486,15 +492,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 2, "dirs_count": 1, "size_count": 15229, @@ -520,15 +527,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 2, "dirs_count": 0, "size_count": 15229, @@ -554,6 +562,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": true, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [ { "type": "maven", @@ -603,11 +617,6 @@ "for_packages": [ "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": true, - "is_readme": false, - "is_top_level": true, - "is_key_file": true, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -633,6 +642,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": true, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [ { "type": "maven", @@ -807,11 +822,6 @@ "for_packages": [ "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": true, - "is_readme": false, - "is_top_level": true, - "is_key_file": true, "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -837,15 +847,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 2, "dirs_count": 2, "size_count": 4260, @@ -871,15 +882,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 2, "dirs_count": 1, "size_count": 4260, @@ -905,15 +917,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 2, "dirs_count": 0, "size_count": 4260, @@ -939,15 +952,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -973,15 +987,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, diff --git a/tests/summarycode/data/score/basic-expected.json b/tests/summarycode/data/score/basic-expected.json index 0d63e1af70b..6be9e76b3ba 100644 --- a/tests/summarycode/data/score/basic-expected.json +++ b/tests/summarycode/data/score/basic-expected.json @@ -378,13 +378,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -418,15 +419,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -494,15 +496,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -570,6 +573,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "npm", @@ -794,11 +803,6 @@ "for_packages": [ "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ diff --git a/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json b/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json index 85dc8fd5fd6..ff2c3215565 100644 --- a/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json +++ b/tests/summarycode/data/score/inconsistent_licenses_copyleft-expected.json @@ -400,13 +400,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -440,15 +441,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -516,15 +518,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -592,6 +595,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "npm", @@ -816,11 +825,6 @@ "for_packages": [ "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -882,15 +886,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "gpl-2.0-plus", "detected_license_expression_spdx": "GPL-2.0-or-later", "license_detections": [ diff --git a/tests/summarycode/data/score/jar-expected.json b/tests/summarycode/data/score/jar-expected.json index eb5ad995038..345bd1f66b6 100644 --- a/tests/summarycode/data/score/jar-expected.json +++ b/tests/summarycode/data/score/jar-expected.json @@ -334,15 +334,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -376,15 +377,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -418,15 +420,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -460,15 +463,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -524,6 +528,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": true, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [ { "type": "jar", @@ -600,11 +610,6 @@ "for_packages": [ "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": true, - "is_readme": false, - "is_top_level": true, - "is_key_file": true, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -638,15 +643,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -680,15 +686,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -722,15 +729,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -764,6 +772,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": true, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [ { "type": "maven", @@ -813,11 +827,6 @@ "for_packages": [ "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": true, - "is_readme": false, - "is_top_level": true, - "is_key_file": true, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -851,6 +860,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": true, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [ { "type": "maven", @@ -1025,11 +1040,6 @@ "for_packages": [ "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": true, - "is_readme": false, - "is_top_level": true, - "is_key_file": true, "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -1085,15 +1095,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1127,15 +1138,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1169,15 +1181,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1211,15 +1224,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -1287,15 +1301,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:maven/org.jboss.logging/jboss-logging@3.4.2.Final?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ diff --git a/tests/summarycode/data/score/no_license_ambiguity-expected.json b/tests/summarycode/data/score/no_license_ambiguity-expected.json index 18ca7a4acd8..e3a9ac6fcc6 100644 --- a/tests/summarycode/data/score/no_license_ambiguity-expected.json +++ b/tests/summarycode/data/score/no_license_ambiguity-expected.json @@ -400,13 +400,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -440,13 +441,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": true, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -480,13 +482,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit OR apache-2.0", "detected_license_expression_spdx": "MIT OR Apache-2.0", "license_detections": [ @@ -542,6 +545,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "cargo", @@ -746,11 +755,6 @@ "for_packages": [ "pkg:cargo/rand@0.8.5?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit OR apache-2.0", "detected_license_expression_spdx": "MIT OR Apache-2.0", "license_detections": [ @@ -824,13 +828,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -886,13 +891,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -970,13 +976,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit OR apache-2.0", "detected_license_expression_spdx": "MIT OR Apache-2.0", "license_detections": [ @@ -1032,13 +1039,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": true, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1072,13 +1080,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], diff --git a/tests/summarycode/data/score/no_license_or_copyright-expected.json b/tests/summarycode/data/score/no_license_or_copyright-expected.json index 0bba0b1cf02..cc35573bc77 100644 --- a/tests/summarycode/data/score/no_license_or_copyright-expected.json +++ b/tests/summarycode/data/score/no_license_or_copyright-expected.json @@ -288,13 +288,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -328,15 +329,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -370,15 +372,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -412,6 +415,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "npm", @@ -613,11 +622,6 @@ "for_packages": [ "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], diff --git a/tests/summarycode/data/score/no_license_text-expected.json b/tests/summarycode/data/score/no_license_text-expected.json index 9322ee2c4ed..884ef0a6f96 100644 --- a/tests/summarycode/data/score/no_license_text-expected.json +++ b/tests/summarycode/data/score/no_license_text-expected.json @@ -356,13 +356,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -396,15 +397,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -450,15 +452,16 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -492,6 +495,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "npm", @@ -716,11 +725,6 @@ "for_packages": [ "pkg:npm/%40invisionag/eslint-config-ivx@0.0.10?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ diff --git a/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json b/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json index 931e4f0dc23..807e6a17ec4 100644 --- a/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json +++ b/tests/summarycode/data/summary/conflicting_license_categories/conflicting_license_categories.expected.json @@ -201,13 +201,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -241,13 +242,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -293,13 +295,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -355,13 +358,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -417,13 +421,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -457,13 +462,14 @@ "is_media": false, "is_source": true, "is_script": true, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -555,13 +561,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -595,13 +602,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "gpl-1.0-plus AND gpl-2.0 AND gpl-2.0-plus", "detected_license_expression_spdx": "GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later", "license_detections": [ diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json index dae88e17169..5b4fefec791 100644 --- a/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json @@ -278,13 +278,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -318,15 +319,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -394,13 +396,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -434,13 +437,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -474,15 +478,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "bsd-new", "detected_license_expression_spdx": "BSD-3-Clause", "license_detections": [ @@ -564,6 +569,12 @@ "is_media": false, "is_source": true, "is_script": true, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -652,11 +663,6 @@ "for_packages": [ "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "bsd-new", "detected_license_expression_spdx": "BSD-3-Clause", "license_detections": [ @@ -796,6 +802,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -875,11 +887,6 @@ "for_packages": [ "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], diff --git a/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json b/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json index 98f2f78b844..0b63a2b0ac6 100644 --- a/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json +++ b/tests/summarycode/data/summary/end-2-end/bug-1141.expected.json @@ -103,13 +103,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -143,13 +144,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -183,13 +185,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -223,13 +226,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -263,13 +267,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "gpl-3.0-plus", "detected_license_expression_spdx": "GPL-3.0-or-later", "license_detections": [ @@ -325,13 +330,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -365,13 +371,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -405,13 +412,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -445,13 +453,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -485,13 +494,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "gpl-2.0-plus", "detected_license_expression_spdx": "GPL-2.0-or-later", "license_detections": [ @@ -559,13 +569,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], diff --git a/tests/summarycode/data/summary/holders/clear_holder.expected.json b/tests/summarycode/data/summary/holders/clear_holder.expected.json index 7f45a0203db..5f96167a2af 100644 --- a/tests/summarycode/data/summary/holders/clear_holder.expected.json +++ b/tests/summarycode/data/summary/holders/clear_holder.expected.json @@ -139,13 +139,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -179,13 +180,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -277,13 +279,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -339,13 +342,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -401,13 +405,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -441,13 +446,14 @@ "is_media": false, "is_source": true, "is_script": true, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -529,13 +535,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -569,13 +576,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ diff --git a/tests/summarycode/data/summary/holders/combined_holders.expected.json b/tests/summarycode/data/summary/holders/combined_holders.expected.json index 2e8df984adf..af237f9920e 100644 --- a/tests/summarycode/data/summary/holders/combined_holders.expected.json +++ b/tests/summarycode/data/summary/holders/combined_holders.expected.json @@ -135,13 +135,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -175,13 +176,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -273,13 +275,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -335,13 +338,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -397,13 +401,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -437,13 +442,14 @@ "is_media": false, "is_source": true, "is_script": true, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -513,13 +519,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -553,13 +560,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ diff --git a/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json b/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json index d020b6be760..8245fa1f653 100644 --- a/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json +++ b/tests/summarycode/data/summary/license_ambiguity/ambiguous.expected.json @@ -103,13 +103,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -143,13 +144,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -195,13 +197,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -257,13 +260,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ diff --git a/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json b/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json index b28862b3e9e..835d91007cb 100644 --- a/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json +++ b/tests/summarycode/data/summary/license_ambiguity/unambiguous.expected.json @@ -135,13 +135,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -175,13 +176,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -263,13 +265,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -325,13 +328,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ diff --git a/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json b/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json index a34edb9e966..c7561fb0815 100644 --- a/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json +++ b/tests/summarycode/data/summary/multiple_package_data/multiple_package_data.expected.json @@ -386,13 +386,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -426,15 +427,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -516,15 +518,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -580,6 +583,12 @@ "is_media": false, "is_source": false, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "cargo", @@ -661,11 +670,6 @@ "pkg:cargo/codebase?uuid=fixed-uid-done-for-testing-5642512d1758", "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -727,15 +731,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -791,6 +796,12 @@ "is_media": false, "is_source": true, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -871,11 +882,6 @@ "for_packages": [ "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ diff --git a/tests/summarycode/data/summary/single_file/single_file.expected.json b/tests/summarycode/data/summary/single_file/single_file.expected.json index ce2deb498f3..940db2095bf 100644 --- a/tests/summarycode/data/summary/single_file/single_file.expected.json +++ b/tests/summarycode/data/summary/single_file/single_file.expected.json @@ -63,13 +63,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -103,13 +104,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "jetty", "detected_license_expression_spdx": "LicenseRef-scancode-jetty", "license_detections": [ diff --git a/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json b/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json index 57e2c459290..09b55a84052 100644 --- a/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json +++ b/tests/summarycode/data/summary/summary_without_holder/summary-without-holder-pypi.expected.json @@ -300,13 +300,14 @@ { "path": "pip-22.0.4", "type": "directory", - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -317,15 +318,16 @@ { "path": "pip-22.0.4/AUTHORS.txt", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": true, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -336,15 +338,16 @@ { "path": "pip-22.0.4/LICENSE.txt", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -377,15 +380,16 @@ { "path": "pip-22.0.4/MANIFEST.in", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -396,15 +400,16 @@ { "path": "pip-22.0.4/NEWS.rst", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -415,6 +420,12 @@ { "path": "pip-22.0.4/PKG-INFO", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -526,11 +537,6 @@ "for_packages": [ "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -622,15 +628,16 @@ { "path": "pip-22.0.4/README.rst", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -641,13 +648,14 @@ { "path": "pip-22.0.4/docs", "type": "directory", - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -658,6 +666,12 @@ { "path": "pip-22.0.4/docs/requirements.txt", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -884,11 +898,6 @@ "for_packages": [ "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -899,15 +908,16 @@ { "path": "pip-22.0.4/pyproject.toml", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": true, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -918,6 +928,12 @@ { "path": "pip-22.0.4/setup.cfg", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -1006,11 +1022,6 @@ "for_packages": [ "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "unknown-license-reference", "detected_license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", "license_detections": [ @@ -1060,6 +1071,12 @@ { "path": "pip-22.0.4/setup.py", "type": "file", + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -1171,11 +1188,6 @@ "for_packages": [ "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -1222,13 +1234,14 @@ { "path": "pip-22.0.4/src", "type": "directory", - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1239,13 +1252,14 @@ { "path": "pip-22.0.4/src/pip", "type": "directory", - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1256,15 +1270,16 @@ { "path": "pip-22.0.4/src/pip/__init__.py", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1275,15 +1290,16 @@ { "path": "pip-22.0.4/src/pip/__main__.py", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1294,15 +1310,16 @@ { "path": "pip-22.0.4/src/pip/py.typed", "type": "file", - "package_data": [], - "for_packages": [ - "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/pip@22.0.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], diff --git a/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json b/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json index a3d0458a742..d0ceaa78f12 100644 --- a/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json +++ b/tests/summarycode/data/summary/use_holder_from_package_resource/use_holder_from_package_resource.expected.json @@ -168,13 +168,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -208,15 +209,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/atheris?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/atheris?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -262,6 +264,12 @@ "is_media": false, "is_source": true, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -353,11 +361,6 @@ "for_packages": [ "pkg:pypi/atheris?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ diff --git a/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json b/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json index 7e9c6bde26f..dcfab05655c 100644 --- a/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json +++ b/tests/summarycode/data/summary/with_package_data/with_package_data.expected.json @@ -259,13 +259,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -299,15 +300,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -389,15 +391,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -453,15 +456,16 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [ - "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" - ], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ @@ -517,6 +521,12 @@ "is_media": false, "is_source": true, "is_script": false, + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "pypi", @@ -597,11 +607,6 @@ "for_packages": [ "pkg:pypi/codebase?uuid=fixed-uid-done-for-testing-5642512d1758" ], - "is_legal": false, - "is_manifest": false, - "is_readme": false, - "is_top_level": false, - "is_key_file": false, "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ diff --git a/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json b/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json index f606c5f54e3..5d3740dd2c2 100644 --- a/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json +++ b/tests/summarycode/data/summary/without_package_data/without_package_data.expected.json @@ -135,13 +135,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -175,13 +176,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", "license_detections": [ @@ -263,13 +265,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "apache-2.0", "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ @@ -325,13 +328,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "mit", "detected_license_expression_spdx": "MIT", "license_detections": [ diff --git a/tests/summarycode/data/tallies/copyright_tallies/tallies_key_files.expected.json b/tests/summarycode/data/tallies/copyright_tallies/tallies_key_files.expected.json index 6448c54fe64..121d61ae48c 100644 --- a/tests/summarycode/data/tallies/copyright_tallies/tallies_key_files.expected.json +++ b/tests/summarycode/data/tallies/copyright_tallies/tallies_key_files.expected.json @@ -169,6 +169,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -202,6 +203,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -235,6 +237,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -268,6 +271,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright 2005, JBoss Inc., and individual contributors", @@ -313,6 +317,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 2005 Brian Goetz and Tim Peierls", @@ -364,6 +369,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright 2010, Red Hat, Inc. and individual contributors", @@ -409,6 +415,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [ @@ -448,6 +455,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [ @@ -487,6 +495,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright 2009, Red Hat Middleware LLC, and individual contributors", @@ -532,6 +541,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [ @@ -571,6 +581,7 @@ "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -604,6 +615,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -637,6 +649,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2011 Mark Adler", @@ -682,6 +695,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2013 Jean-loup Gailly and Mark Adler", @@ -727,6 +741,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2013 Jean-loup Gailly", @@ -772,6 +787,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -805,6 +821,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -838,6 +855,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 2002-2004 Dmitriy Anisimkov", @@ -883,6 +901,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2011 Mark Adler", @@ -928,6 +947,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2013 Jean-loup Gailly and Mark Adler", @@ -973,6 +993,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2012 Jean-loup Gailly", @@ -1018,6 +1039,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -1051,6 +1073,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 2004 by Henrik Ravn", @@ -1096,6 +1119,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright Henrik Ravn 2004", @@ -1141,6 +1165,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -1174,6 +1199,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant", @@ -1225,6 +1251,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -1258,6 +1285,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2008 Mark Adler", @@ -1303,6 +1331,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 2003 Mark Adler", @@ -1348,6 +1377,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [], "holders": [], "authors": [], @@ -1381,6 +1411,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1997 Christian Michelsen Research AS Advanced Computing", @@ -1426,6 +1457,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2013 Jean-loup Gailly and Mark Adler", @@ -1471,6 +1503,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly", @@ -1516,6 +1549,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "copyrights": [ { "copyright": "Copyright (c) 1995-2013 Jean-loup Gailly", diff --git a/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json b/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json index 538a1f04ecb..9f3c3a18a06 100644 --- a/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json +++ b/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json @@ -132,13 +132,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -173,13 +174,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -214,13 +216,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -255,13 +258,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -296,13 +300,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": true, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "gpl-3.0-plus", "detected_license_expression_spdx": "GPL-3.0-or-later", "license_detections": [ @@ -361,13 +366,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -404,13 +410,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -445,13 +452,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -486,13 +494,14 @@ "is_media": false, "is_source": false, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -527,13 +536,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": "gpl-2.0-plus", "detected_license_expression_spdx": "GPL-2.0-or-later", "license_detections": [ @@ -604,13 +614,14 @@ "is_media": false, "is_source": true, "is_script": false, - "package_data": [], - "for_packages": [], "is_legal": false, "is_manifest": false, "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], diff --git a/tests/summarycode/data/tallies/full_tallies/tallies.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies.expected.json index 6e1ef18b90b..42e06a2a7de 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies.expected.json @@ -3590,10 +3590,10 @@ ] }, { - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", "license_expression_spdx": "Zlib", - "detection_count": 9, + "detection_count": 7, "reference_matches": [ { "license_expression": "zlib", @@ -3608,6 +3608,42 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" + } + ] + }, + { + "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_5.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" } ] }, @@ -4483,9 +4519,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -4625,9 +4678,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8064,9 +8134,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8135,9 +8222,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8206,9 +8310,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8906,9 +9027,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8977,9 +9115,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json index 64f06c8099d..c2a7cb2080d 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies_by_facet.expected.json @@ -3590,10 +3590,10 @@ ] }, { - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", "license_expression_spdx": "Zlib", - "detection_count": 9, + "detection_count": 7, "reference_matches": [ { "license_expression": "zlib", @@ -3608,6 +3608,42 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" + } + ] + }, + { + "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_5.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" } ] }, @@ -4828,9 +4864,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -4997,9 +5050,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8744,9 +8814,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8820,9 +8907,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -8896,9 +9000,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -9687,9 +9808,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -9763,9 +9901,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json index b49b4bc824e..237416ecfe0 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies_details.expected.json @@ -3590,10 +3590,10 @@ ] }, { - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", "license_expression_spdx": "Zlib", - "detection_count": 9, + "detection_count": 7, "reference_matches": [ { "license_expression": "zlib", @@ -3608,6 +3608,42 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" + } + ] + }, + { + "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_5.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" } ] }, @@ -5119,9 +5155,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -5325,9 +5378,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -9031,9 +9101,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -9134,9 +9221,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -9237,9 +9341,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -10329,9 +10450,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -10432,9 +10570,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines b/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines index bbebaa5ffa6..01d15846de0 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines +++ b/tests/summarycode/data/tallies/full_tallies/tallies_key_files-details.expected.json-lines @@ -22,8 +22,8 @@ "system_environment": { "operating_system": "linux", "cpu_architecture": "64", - "platform": "Linux-5.15.0-141-generic-x86_64-with-glibc2.35", - "platform_version": "#151-Ubuntu SMP Sun May 18 21:35:19 UTC 2025", + "platform": "Linux-5.15.0-140-generic-x86_64-with-glibc2.35", + "platform_version": "#150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025", "python_version": "3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]" }, "spdx_license_list_version": "3.26", @@ -189,10 +189,10 @@ ] }, { - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", "license_expression_spdx": "Zlib", - "detection_count": 9, + "detection_count": 7, "reference_matches": [ { "license_expression": "zlib", @@ -207,6 +207,42 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" + } + ] + }, + { + "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_5.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" } ] }, @@ -488,6 +524,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -530,6 +567,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, "detected_license_expression": "cc0-1.0", "detected_license_expression_spdx": "CC0-1.0", "license_detections": [ @@ -594,6 +632,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, "detected_license_expression": "artistic-2.0", "detected_license_expression_spdx": "Artistic-2.0", "license_detections": [ @@ -664,6 +703,7 @@ "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -706,6 +746,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -748,6 +789,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -768,9 +810,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -824,6 +883,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -900,6 +960,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -920,9 +981,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -976,6 +1054,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1018,6 +1097,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1060,6 +1140,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "lgpl-2.1-plus", "detected_license_expression_spdx": "LGPL-2.1-or-later", "license_detections": [ @@ -1136,6 +1217,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "cc-by-2.5", "detected_license_expression_spdx": "CC-BY-2.5", "license_detections": [ @@ -1218,6 +1300,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "lgpl-2.1-plus", "detected_license_expression_spdx": "LGPL-2.1-or-later", "license_detections": [ @@ -1294,6 +1377,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1342,6 +1426,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1390,6 +1475,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "lgpl-2.1-plus", "detected_license_expression_spdx": "LGPL-2.1-or-later", "license_detections": [ @@ -1466,6 +1552,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1514,6 +1601,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1556,6 +1644,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1576,9 +1665,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1632,6 +1738,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1652,9 +1759,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1708,6 +1832,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1728,9 +1853,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1784,6 +1926,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1860,6 +2003,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1880,9 +2024,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1936,6 +2097,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1956,9 +2118,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -2012,6 +2191,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2054,6 +2234,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "gpl-2.0-plus WITH ada-linking-exception", "detected_license_expression_spdx": "GPL-2.0-or-later WITH GNAT-exception", "license_detections": [ @@ -2130,6 +2311,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2172,6 +2354,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2226,6 +2409,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "boost-1.0", "detected_license_expression_spdx": "BSL-1.0", "license_detections": [ @@ -2302,6 +2486,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2344,6 +2529,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2426,6 +2612,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2468,6 +2655,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2544,6 +2732,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2620,6 +2809,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2662,6 +2852,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "mit-old-style", "detected_license_expression_spdx": "LicenseRef-scancode-mit-old-style", "license_detections": [ diff --git a/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json b/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json index 656be014c0b..28c2360755d 100644 --- a/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json +++ b/tests/summarycode/data/tallies/full_tallies/tallies_key_files.expected.json @@ -155,10 +155,10 @@ ] }, { - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", "license_expression": "zlib", "license_expression_spdx": "Zlib", - "detection_count": 9, + "detection_count": 7, "reference_matches": [ { "license_expression": "zlib", @@ -173,6 +173,42 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" + } + ] + }, + { + "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296", + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/infback9/infback9.c", + "start_line": 3, + "end_line": 3, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_5.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" } ] }, @@ -448,6 +484,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -486,6 +523,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -524,6 +562,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -562,6 +601,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "lgpl-2.1-plus", "detected_license_expression_spdx": "LGPL-2.1-or-later", "license_detections": [ @@ -634,6 +674,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "cc-by-2.5", "detected_license_expression_spdx": "CC-BY-2.5", "license_detections": [ @@ -712,6 +753,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "lgpl-2.1-plus", "detected_license_expression_spdx": "LGPL-2.1-or-later", "license_detections": [ @@ -784,6 +826,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -828,6 +871,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -872,6 +916,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "lgpl-2.1-plus", "detected_license_expression_spdx": "LGPL-2.1-or-later", "license_detections": [ @@ -944,6 +989,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -988,6 +1034,7 @@ "is_readme": true, "is_top_level": true, "is_key_file": true, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1026,6 +1073,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1064,6 +1112,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1084,9 +1133,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1136,6 +1202,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1208,6 +1275,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1228,9 +1296,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/arch/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1280,6 +1365,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, "detected_license_expression": "cc0-1.0", "detected_license_expression_spdx": "CC0-1.0", "license_detections": [ @@ -1340,6 +1426,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, + "is_community": false, "detected_license_expression": "artistic-2.0", "detected_license_expression_spdx": "Artistic-2.0", "license_detections": [ @@ -1406,6 +1493,7 @@ "is_readme": false, "is_top_level": true, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1444,6 +1532,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1482,6 +1571,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "gpl-2.0-plus WITH ada-linking-exception", "detected_license_expression_spdx": "GPL-2.0-or-later WITH GNAT-exception", "license_detections": [ @@ -1554,6 +1644,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1574,9 +1665,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1626,6 +1734,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1646,9 +1755,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1698,6 +1824,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -1718,9 +1845,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -1770,6 +1914,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1808,6 +1953,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1858,6 +2004,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "boost-1.0", "detected_license_expression_spdx": "BSL-1.0", "license_detections": [ @@ -1930,6 +2077,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -1968,6 +2116,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2046,6 +2195,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2084,6 +2234,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2156,6 +2307,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2228,6 +2380,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -2266,6 +2419,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "mit-old-style", "detected_license_expression_spdx": "LicenseRef-scancode-mit-old-style", "license_detections": [ @@ -2338,6 +2492,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2410,6 +2565,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2430,9 +2586,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], @@ -2482,6 +2655,7 @@ "is_readme": false, "is_top_level": false, "is_key_file": false, + "is_community": false, "detected_license_expression": "zlib", "detected_license_expression_spdx": "Zlib", "license_detections": [ @@ -2502,9 +2676,26 @@ "rule_relevance": 100, "rule_identifier": "zlib_5.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_5.RULE" + }, + { + "license_expression": "zlib", + "license_expression_spdx": "Zlib", + "from_file": "scan/zlib/zlib.h", + "start_line": 6, + "end_line": 23, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 144, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "zlib_17.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/zlib_17.RULE" } ], - "identifier": "zlib-27de81f4-f6ce-2bf5-ab37-9a4c71f4b296" + "identifier": "zlib-663c0d51-510f-fca6-b163-671ecb188ff9", + "detection_log": [ + "unknown-reference-to-local-file" + ] } ], "license_clues": [], diff --git a/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4-expected.json b/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4-expected.json new file mode 100644 index 00000000000..2fd66d61c55 --- /dev/null +++ b/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4-expected.json @@ -0,0 +1,587 @@ +{ + "summary": { + "declared_license_expression": "mit", + "license_clarity_score": { + "score": 0, + "declared_license": false, + "identification_precision": false, + "has_license_text": false, + "declared_copyrights": false, + "conflicting_license_categories": false, + "ambiguous_compound_licensing": true + }, + "declared_holder": "", + "primary_language": "JavaScript", + "other_license_expressions": [ + { + "value": "unknown-license-reference", + "count": 1 + } + ], + "other_holders": [], + "other_languages": [] + }, + "todo": [], + "packages": [ + { + "type": "npm", + "namespace": null, + "name": "invariant", + "version": "2.2.4", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "invariant", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Andres Suarez", + "email": "zertosh@gmail.com", + "url": null + } + ], + "keywords": [ + "test", + "invariant" + ], + "homepage_url": null, + "download_url": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/zertosh/invariant", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "invariant-2.2.4/package/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://www.npmjs.com/package/invariant", + "repository_download_url": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "api_data_url": "https://registry.npmjs.org/invariant/2.2.4", + "package_uid": "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "invariant-2.2.4/package/package.json" + ], + "datasource_ids": [ + "npm_package_json" + ], + "purl": "pkg:npm/invariant@2.2.4" + } + ], + "dependencies": [ + { + "purl": "pkg:npm/loose-envify", + "extracted_requirement": "^1.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/loose-envify?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "invariant-2.2.4/package/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/browserify", + "extracted_requirement": "^11.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/browserify?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "invariant-2.2.4/package/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/flow-bin", + "extracted_requirement": "^0.67.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/flow-bin?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "invariant-2.2.4/package/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/tap", + "extracted_requirement": "^1.4.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/tap?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "invariant-2.2.4/package/package.json", + "datasource_id": "npm_package_json" + } + ], + "license_detections": [ + { + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "invariant-2.2.4/package/package.json", + "start_line": 9, + "end_line": 9, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": " \"license\": \"MIT\",", + "matched_text_diagnostics": "license\": \"MIT\"," + } + ] + }, + { + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "invariant-2.2.4/package/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ] + }, + { + "identifier": "unknown_license_reference-9cefceda-96e9-1ab2-26f9-944b64f7ad39", + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "detection_count": 1, + "detection_log": [ + "unknown-match" + ], + "reference_matches": [ + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "invariant-2.2.4/package/CHANGELOG.md", + "start_line": 35, + "end_line": 37, + "matcher": "2-aho", + "score": 80.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 80, + "rule_identifier": "unknown-license-reference_335.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_335.RULE", + "matched_text": " * Fix license.\n\n2.1.1 / 2015-09-20", + "matched_text_diagnostics": "license.\n\n2.1." + } + ] + } + ], + "files": [ + { + "path": "invariant-2.2.4", + "type": "directory", + "name": "invariant-2.2.4", + "base_name": "invariant-2.2.4", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "sha1_git": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "files_count": 2, + "dirs_count": 1, + "size_count": 2009, + "scan_errors": [] + }, + { + "path": "invariant-2.2.4/package", + "type": "directory", + "name": "package", + "base_name": "package", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "sha1_git": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "is_community": false, + "package_data": [], + "for_packages": [], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "files_count": 2, + "dirs_count": 0, + "size_count": 2009, + "scan_errors": [] + }, + { + "path": "invariant-2.2.4/package/CHANGELOG.md", + "type": "file", + "name": "CHANGELOG.md", + "base_name": "CHANGELOG", + "extension": ".md", + "size": 1291, + "sha1": "f795e582196db7876232a93728d9708956437655", + "md5": "7999017ee9e378b7d1d93f8cbb603e18", + "sha256": "df73843bcaea3d526beebec59b8129800666556b7632f2340d4f00617c2f090f", + "sha1_git": "bc52f1c5cfc91f1958084badbec318e2f2fcab3f", + "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, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "is_community": true, + "package_data": [], + "for_packages": [ + "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "unknown-license-reference", + "detected_license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "license_detections": [ + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "matches": [ + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "invariant-2.2.4/package/CHANGELOG.md", + "start_line": 35, + "end_line": 37, + "matcher": "2-aho", + "score": 80.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 80, + "rule_identifier": "unknown-license-reference_335.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_335.RULE", + "matched_text": " * Fix license.\n\n2.1.1 / 2015-09-20", + "matched_text_diagnostics": "license.\n\n2.1." + } + ], + "detection_log": [ + "unknown-match" + ], + "identifier": "unknown_license_reference-9cefceda-96e9-1ab2-26f9-944b64f7ad39" + } + ], + "license_clues": [], + "percentage_of_license_text": 1.67, + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "invariant-2.2.4/package/package.json", + "type": "file", + "name": "package.json", + "base_name": "package", + "extension": ".json", + "size": 718, + "sha1": "59f8a398ae23614df8c1d975429934fdf9bc1949", + "md5": "dac187567d428f65dcca40fdc47e9fba", + "sha256": "ef0c08d9f91029e247bb570a04903f3a9bd646c1f2128d29e69ee171794cd2a3", + "sha1_git": "bb1499fd6f9a82ff81d46df23de0c8920f11029e", + "mime_type": "application/json", + "file_type": "JSON data", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "invariant", + "version": "2.2.4", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "invariant", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Andres Suarez", + "email": "zertosh@gmail.com", + "url": null + } + ], + "keywords": [ + "test", + "invariant" + ], + "homepage_url": null, + "download_url": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/zertosh/invariant", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "invariant-2.2.4/package/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/loose-envify", + "extracted_requirement": "^1.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/browserify", + "extracted_requirement": "^11.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/flow-bin", + "extracted_requirement": "^0.67.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tap", + "extracted_requirement": "^1.4.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_pinned": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://www.npmjs.com/package/invariant", + "repository_download_url": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "api_data_url": "https://registry.npmjs.org/invariant/2.2.4", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/invariant@2.2.4" + } + ], + "for_packages": [ + "pkg:npm/invariant@2.2.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "invariant-2.2.4/package/package.json", + "start_line": 9, + "end_line": 9, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "matched_text": " \"license\": \"MIT\",", + "matched_text_diagnostics": "license\": \"MIT\"," + } + ], + "detection_log": [], + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee" + } + ], + "license_clues": [], + "percentage_of_license_text": 2.6, + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4/package/CHANGELOG.md b/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4/package/CHANGELOG.md new file mode 100644 index 00000000000..bc52f1c5cfc --- /dev/null +++ b/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4/package/CHANGELOG.md @@ -0,0 +1,69 @@ +2.2.4 / 2018-03-13 +================== + + * Use flow strict mode (i.e. `@flow strict`). + +2.2.3 / 2018-02-19 +================== + + * Change license from BSD+Patents to MIT. + +2.2.2 / 2016-11-15 +================== + + * Add LICENSE file. + * Misc housekeeping. + +2.2.1 / 2016-03-09 +================== + + * Use `NODE_ENV` variable instead of `__DEV__` to cache `process.env.NODE_ENV`. + +2.2.0 / 2015-11-17 +================== + + * Use `error.name` instead of `Invariant Violation`. + +2.1.3 / 2015-11-17 +================== + + * Remove `@provideModule` pragma. + +2.1.2 / 2015-10-27 +================== + + * Fix license. + +2.1.1 / 2015-09-20 +================== + + * Use correct SPDX license. + * Test "browser.js" using browserify. + * Switch from "envify" to "loose-envify". + +2.1.0 / 2015-06-03 +================== + + * Add "envify" as a dependency. + * Fixed license field in "package.json". + +2.0.0 / 2015-02-21 +================== + + * Switch to using the "browser" field. There are now browser and server versions that respect the "format" in production. + +1.0.2 / 2014-09-24 +================== + + * Added tests, npmignore and gitignore. + * Clarifications in README. + +1.0.1 / 2014-09-24 +================== + + * Actually include 'invariant.js'. + +1.0.0 / 2014-09-24 +================== + + * Initial release. diff --git a/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4/package/package.json b/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4/package/package.json new file mode 100644 index 00000000000..bb1499fd6f9 --- /dev/null +++ b/tests/summarycode/data/todo/ignore_issue/invariant-2.2.4/package/package.json @@ -0,0 +1,35 @@ +{ + "name": "invariant", + "version": "2.2.4", + "description": "invariant", + "keywords": [ + "test", + "invariant" + ], + "license": "MIT", + "author": "Andres Suarez ", + "files": [ + "browser.js", + "invariant.js", + "invariant.js.flow" + ], + "repository": "https://github.com/zertosh/invariant", + "scripts": { + "test": "NODE_ENV=production tap test/*.js && NODE_ENV=development tap test/*.js" + }, + "dependencies": { + "loose-envify": "^1.0.0" + }, + "devDependencies": { + "browserify": "^11.0.1", + "flow-bin": "^0.67.1", + "tap": "^1.4.0" + }, + "main": "invariant.js", + "browser": "browser.js", + "browserify": { + "transform": [ + "loose-envify" + ] + } +} diff --git a/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json b/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json index 73f7cfe22a2..37de06d8de7 100644 --- a/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json +++ b/tests/summarycode/data/todo/no_todo/base64-arraybuffer.expected.json @@ -1,4 +1,32 @@ { + "summary": { + "declared_license_expression": "mit", + "license_clarity_score": { + "score": 100, + "declared_license": true, + "identification_precision": true, + "has_license_text": true, + "declared_copyrights": true, + "conflicting_license_categories": false, + "ambiguous_compound_licensing": false + }, + "declared_holder": "Niklas von Hertzen", + "primary_language": "JavaScript", + "other_license_expressions": [ + { + "value": null, + "count": 1 + } + ], + "other_holders": [ + { + "value": null, + "count": 2 + } + ], + "other_languages": [] + }, + "todo": [], "packages": [ { "type": "npm", @@ -309,7 +337,6 @@ ] } ], - "todo": [], "files": [ { "path": "base64-arraybuffer-0.1.4", @@ -331,6 +358,13 @@ "is_media": false, "is_source": false, "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "is_community": false, "package_data": [], "for_packages": [], "detected_license_expression": null, @@ -341,7 +375,6 @@ "copyrights": [], "holders": [], "authors": [], - "for_todo": [], "files_count": 5, "dirs_count": 1, "size_count": 4564, @@ -367,6 +400,13 @@ "is_media": false, "is_source": false, "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "is_community": false, "package_data": [], "for_packages": [ "pkg:npm/base64-arraybuffer@0.1.4?uuid=fixed-uid-done-for-testing-5642512d1758" @@ -379,7 +419,6 @@ "copyrights": [], "holders": [], "authors": [], - "for_todo": [], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -405,6 +444,13 @@ "is_media": false, "is_source": false, "is_script": false, + "for_todo": [], + "is_legal": true, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [], "for_packages": [ "pkg:npm/base64-arraybuffer@0.1.4?uuid=fixed-uid-done-for-testing-5642512d1758" @@ -451,7 +497,6 @@ } ], "authors": [], - "for_todo": [], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -477,6 +522,13 @@ "is_media": false, "is_source": false, "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": true, + "is_top_level": true, + "is_key_file": true, + "is_community": false, "package_data": [], "for_packages": [ "pkg:npm/base64-arraybuffer@0.1.4?uuid=fixed-uid-done-for-testing-5642512d1758" @@ -523,7 +575,6 @@ } ], "authors": [], - "for_todo": [], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -549,6 +600,13 @@ "is_media": false, "is_source": false, "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "is_community": false, "package_data": [], "for_packages": [ "pkg:npm/base64-arraybuffer@0.1.4?uuid=fixed-uid-done-for-testing-5642512d1758" @@ -561,7 +619,6 @@ "copyrights": [], "holders": [], "authors": [], - "for_todo": [], "files_count": 1, "dirs_count": 0, "size_count": 1704, @@ -587,6 +644,13 @@ "is_media": false, "is_source": true, "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [], "for_packages": [ "pkg:npm/base64-arraybuffer@0.1.4?uuid=fixed-uid-done-for-testing-5642512d1758" @@ -633,7 +697,6 @@ } ], "authors": [], - "for_todo": [], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -659,6 +722,13 @@ "is_media": false, "is_source": false, "is_script": false, + "for_todo": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "is_community": false, "package_data": [ { "type": "npm", @@ -871,7 +941,6 @@ "end_line": 7 } ], - "for_todo": [], "files_count": 0, "dirs_count": 0, "size_count": 0, diff --git a/tests/summarycode/data/todo/todo_present/README.multi-orig-tarball-package-expected-diag.json b/tests/summarycode/data/todo/todo_present/README.multi-orig-tarball-package-expected-diag.json index 460579ef29c..165178b3913 100644 --- a/tests/summarycode/data/todo/todo_present/README.multi-orig-tarball-package-expected-diag.json +++ b/tests/summarycode/data/todo/todo_present/README.multi-orig-tarball-package-expected-diag.json @@ -1,5 +1,4 @@ { - "license_detections": [], "todo": [ { "detection_id": "borceux-d99f172d-bc25-b4f7-b6bf-cccec1995ce5", @@ -28,6 +27,7 @@ "rule_notes": null, "referenced_filenames": [], "matched_text": "This src:package consists of various tarballs.\n\nThis README is a dummy file for creating the base tarball of the name", + "matched_text_diagnostics": "package consists of [various] [tarballs].\n\n[This] README", "rule_text": "Copyright 1993 Francis Borceux\nYou may freely use, modify, and/or distribute each of the files in this package without limitation. The package consists of the following files:\n\nREADME\ncompatibility/OldDiagram\ncompatibility/OldMaxiDiagram\ncompatibility/OldMicroDiagram\ncompatibility/OldMiniDiagram\ncompatibility/OldMultipleArrows\ndiagram/Diagram\ndiagram/MaxiDiagram\ndiagram/MicroDiagram\ndiagram/MiniDiagram\ndiagram/MultipleArrows\nuser-guides/Diagram_Mode_d_Emploi\nuser-guides/Diagram_Read_Me\n\nOf course no support is guaranteed, but the author will attempt to assist with problems. Current email address:\nfrancis dot borceux at uclouvain dot be." } ], @@ -38,10 +38,14 @@ } } ], + "license_detections": [], "files": [ { "path": "README.multi-orig-tarball-package", "type": "file", + "for_todo": [ + "borceux-d99f172d-bc25-b4f7-b6bf-cccec1995ce5" + ], "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], @@ -64,9 +68,6 @@ } ], "percentage_of_license_text": 10.53, - "for_todo": [ - "borceux-d99f172d-bc25-b4f7-b6bf-cccec1995ce5" - ], "scan_errors": [] } ] diff --git a/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json b/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json index 41aa25c6f43..38df592442d 100644 --- a/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json +++ b/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json @@ -1,6 +1,4 @@ { - "packages": [], - "dependencies": [], "todo": [ { "detection_id": "pkg:pypi/scancode-toolkit-e7ce965e-449d-5c31-b5e4-5ad0dfd29f5c", @@ -53,10 +51,15 @@ } } ], + "packages": [], + "dependencies": [], "files": [ { "path": "incomplete-setup.cfg", "type": "file", + "for_todo": [ + "pkg:pypi/scancode-toolkit-e7ce965e-449d-5c31-b5e4-5ad0dfd29f5c" + ], "package_data": [ { "type": "pypi", @@ -104,9 +107,6 @@ } ], "for_packages": [], - "for_todo": [ - "pkg:pypi/scancode-toolkit-e7ce965e-449d-5c31-b5e4-5ad0dfd29f5c" - ], "scan_errors": [] } ] diff --git a/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json b/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json index 38aa62d80e1..b00424d733e 100644 --- a/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json +++ b/tests/summarycode/data/todo/todo_present/unknown-license-expected-diag.json @@ -56,6 +56,7 @@ "rule_notes": "Unknown license based on a composite of license words.", "referenced_filenames": [], "matched_text": "form shall mean the preferred form for making\nthe purposes of this definition control\nsoftware is modified by someone else\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.", + "matched_text_diagnostics": "form shall mean the preferred form for making\nthe purposes of this definition control\n[software] [is] [modified] [by] [someone] [else]\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) [to] [the] interfaces of,\n the Work and Derivative Works thereof.", "rule_text": "form shall mean the preferred form for making\nthe purposes of this definition control\nsoftware is modified by someone else\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof." } ], diff --git a/tests/summarycode/data/todo/todo_present/unknown-license-expected.json b/tests/summarycode/data/todo/todo_present/unknown-license-expected.json index 09057a34892..f342b602a02 100644 --- a/tests/summarycode/data/todo/todo_present/unknown-license-expected.json +++ b/tests/summarycode/data/todo/todo_present/unknown-license-expected.json @@ -1,29 +1,4 @@ { - "license_detections": [ - { - "identifier": "unknown-b0897d47-1c91-9898-2364-2e4d1a34b6fd", - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "detection_count": 1, - "reference_matches": [ - { - "license_expression": "unknown", - "license_expression_spdx": "LicenseRef-scancode-unknown", - "from_file": "unknown-license.txt", - "start_line": 1, - "end_line": 10, - "matcher": "6-unknown", - "score": 86.89, - "matched_length": 53, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "license-detection-unknown-51bcd994ad60981fff8c5f1b1b9af6e3d4f5ba67", - "rule_url": null, - "matched_text": "form shall mean the preferred form for making\nthe purposes of this definition control\nsoftware is modified by someone else\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof." - } - ] - } - ], "todo": [ { "detection_id": "unknown-b0897d47-1c91-9898-2364-2e4d1a34b6fd", @@ -60,10 +35,38 @@ } } ], + "license_detections": [ + { + "identifier": "unknown-b0897d47-1c91-9898-2364-2e4d1a34b6fd", + "license_expression": "unknown", + "license_expression_spdx": "LicenseRef-scancode-unknown", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "unknown", + "license_expression_spdx": "LicenseRef-scancode-unknown", + "from_file": "unknown-license.txt", + "start_line": 1, + "end_line": 10, + "matcher": "6-unknown", + "score": 86.89, + "matched_length": 53, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "license-detection-unknown-51bcd994ad60981fff8c5f1b1b9af6e3d4f5ba67", + "rule_url": null, + "matched_text": "form shall mean the preferred form for making\nthe purposes of this definition control\nsoftware is modified by someone else\n\n\n\nrepresent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof." + } + ] + } + ], "files": [ { "path": "unknown-license.txt", "type": "file", + "for_todo": [ + "unknown-b0897d47-1c91-9898-2364-2e4d1a34b6fd" + ], "detected_license_expression": "unknown", "detected_license_expression_spdx": "LicenseRef-scancode-unknown", "license_detections": [ @@ -92,9 +95,6 @@ ], "license_clues": [], "percentage_of_license_text": 86.89, - "for_todo": [ - "unknown-b0897d47-1c91-9898-2364-2e4d1a34b6fd" - ], "scan_errors": [] } ] diff --git a/tests/summarycode/test_todo.py b/tests/summarycode/test_todo.py index aec1246d8e8..ceaf2484852 100644 --- a/tests/summarycode/test_todo.py +++ b/tests/summarycode/test_todo.py @@ -30,6 +30,8 @@ def test_end2end_todo_works_on_codebase_without_ambiguous_detections(self): run_scan_click([ '-clip', '--todo', + '--classify', + '--summary', '--json-pp', result_file, test_dir ]) check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES) @@ -106,3 +108,21 @@ def test_end2end_todo_works_on_license_clues_diagnostics(self): '--json-pp', result_file, test_dir ]) check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + + def test_todo_ignores_unknown_license_detections_from_community_files(self): + test_dir = self.get_test_loc('ignore_issue/invariant-2.2.4/') + result_file = self.get_temp_file('json') + expected_file = self.get_test_loc('ignore_issue/invariant-2.2.4-expected.json') + run_scan_click([ + '--license', + '--license-text', + '--license-diagnostics', + '--license-text-diagnostics', + '--package', + '--info', + '--classify', + '--summary', + '--todo', + '--json-pp', result_file, test_dir + ]) + check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES)