Skip to content

Commit d61ae7d

Browse files
Remove 'not-combined' from LicenseDetection logs
Reference: #3266 Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent 7e50e17 commit d61ae7d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/licensedcode/detection.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ class DetectionRule(Enum):
114114
115115
These are logged in LicenseDetection.detection_log for verbosity.
116116
"""
117-
NOT_COMBINED = 'not-combined'
118117
UNKNOWN_MATCH = 'unknown-match'
119118
LICENSE_CLUES = 'license-clues'
120119
FALSE_POSITIVE = 'possible-false-positive'
@@ -1049,9 +1048,8 @@ def get_detected_license_expression(
10491048

10501049
else:
10511050
if TRACE_ANALYSIS:
1052-
logger_debug(f'analysis {DetectionRule.NOT_COMBINED.value}')
1051+
logger_debug(f'analysis not-combined')
10531052
matches_for_expression = license_matches
1054-
detection_log.append(DetectionRule.NOT_COMBINED.value)
10551053

10561054
if TRACE:
10571055
logger_debug(f'matches_for_expression: {matches_for_expression}', f'detection_log: {detection_log}')

src/packagedcode/plugin_package.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,7 @@ def add_license_from_file(resource, codebase, no_licenses):
240240
if not license_detections_pkg:
241241
pkg["license_detections"] = license_detections_file.copy()
242242
for detection in pkg["license_detections"]:
243-
244-
if detection["detection_log"] == [DetectionRule.NOT_COMBINED.value]:
245-
detection["detection_log"] = [DetectionRule.PACKAGE_ADD_FROM_FILE.value]
246-
else:
247-
detection["detection_log"].append(DetectionRule.PACKAGE_ADD_FROM_FILE.value)
243+
detection["detection_log"].append(DetectionRule.PACKAGE_ADD_FROM_FILE.value)
248244

249245
license_expression = get_license_expression_from_detection_mappings(
250246
detections=license_detections_file,

0 commit comments

Comments
 (0)