Skip to content

Commit 276f76a

Browse files
use scancode component liceses as fallback
1 parent 4c1fab5 commit 276f76a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/license.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ void print_licenses(component_data_t *comp)
549549
buffer = result + len;
550550
bool first = true;
551551
bool component_license = false;
552+
bool scanoss_license = false;
552553
int file_header_filter = 0;
553554
int scancode_file_filter = 0;
554555
/* Sort licenses by id (ascending) */
@@ -572,10 +573,16 @@ void print_licenses(component_data_t *comp)
572573
continue;
573574
}
574575

576+
if (licenses_by_type.licenses[i].id == 5 && scanoss_license && !full_license_report)
577+
continue;
578+
575579
buffer = license_to_json(crclist, buffer, licenses_by_type.licenses[i].text, licenses_by_type.licenses[i].id, &first);
576580
//just report component license if available
577581
if (licenses_by_type.licenses[i].id == 0 && !first)
578582
component_license = true;
583+
584+
else if (licenses_by_type.licenses[i].id > 0 && !first)
585+
scanoss_license = true;
579586

580587
if (i > 0 && component_license && !full_license_report)
581588
break;

0 commit comments

Comments
 (0)