MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_review_comments

Function get_review_comments

src/summarycode/todo.py:435–472  ·  view source on GitHub ↗
(detection_log)

Source from the content-addressed store, hash-verified

433
434
435def get_review_comments(detection_log):
436
437 review_comments = {}
438
439 if LicenseDetectionCategory.EXTRA_WORDS.value in detection_log:
440 review_comments[LicenseDetectionCategory.EXTRA_WORDS.value] = ReviewComments.EXTRA_WORDS.value
441
442 if LicenseDetectionCategory.LICENSE_CLUES.value in detection_log:
443 review_comments[LicenseDetectionCategory.LICENSE_CLUES.value] = ReviewComments.LICENSE_CLUES.value
444
445 if LicenseDetectionCategory.UNKNOWN_MATCH.value in detection_log:
446 review_comments[LicenseDetectionCategory.UNKNOWN_MATCH.value] = ReviewComments.UNKNOWN_MATCH.value
447
448 if LicenseDetectionCategory.LOW_QUALITY_MATCH_FRAGMENTS.value in detection_log:
449 review_comments[LicenseDetectionCategory.LOW_QUALITY_MATCH_FRAGMENTS.value] = ReviewComments.LOW_QUALITY_MATCH_FRAGMENTS.value
450
451 if LicenseDetectionCategory.LOW_RELEVANCE.value in detection_log:
452 review_comments[LicenseDetectionCategory.LOW_RELEVANCE.value] = ReviewComments.LOW_RELEVANCE.value
453
454 if LicenseDetectionCategory.LICENSE_CLUES.value in detection_log:
455 review_comments[LicenseDetectionCategory.LICENSE_CLUES.value] = ReviewComments.LICENSE_CLUES.value
456
457 if LicenseDetectionCategory.IMPERFECT_COVERAGE.value in detection_log:
458 review_comments[LicenseDetectionCategory.IMPERFECT_COVERAGE.value] = ReviewComments.IMPERFECT_COVERAGE.value
459
460 if LicenseDetectionCategory.FALSE_POSITVE.value in detection_log:
461 review_comments[LicenseDetectionCategory.FALSE_POSITVE.value] = ReviewComments.FALSE_POSITVE.value
462
463 if LicenseDetectionCategory.UNDETECTED_LICENSE.value in detection_log:
464 review_comments[LicenseDetectionCategory.UNDETECTED_LICENSE.value] = ReviewComments.UNDETECTED_LICENSE.value
465
466 if PackageDetectionCategory.CANNOT_CREATE_PURL.value in detection_log:
467 review_comments[PackageDetectionCategory.CANNOT_CREATE_PURL.value] = ReviewComments.CANNOT_CREATE_PURL.value
468
469 if PackageDetectionCategory.CANNOT_CREATE_TOP_LEVEL_PACKAGE.value in detection_log:
470 review_comments[PackageDetectionCategory.CANNOT_CREATE_TOP_LEVEL_PACKAGE.value] = ReviewComments.CANNOT_CREATE_TOP_LEVEL_PACKAGE.value
471
472 return review_comments
473
474
475AMBIGUOUS_LICENSE_DETECTION_TYPES = [

Callers 2

from_packageMethod · 0.85
from_licenseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected