diff --git a/inc/scanoss.h b/inc/scanoss.h index 64dc948..d5f6768 100644 --- a/inc/scanoss.h +++ b/inc/scanoss.h @@ -33,7 +33,7 @@ #define WFP_LN 4 #define WFP_REC_LN 18 -#define SCANOSS_VERSION "5.4.21" +#define SCANOSS_VERSION "5.4.22" /* Log files */ #define SCAN_LOG "/tmp/scanoss_scan.log" diff --git a/src/match.c b/src/match.c index 12399eb..d02a780 100644 --- a/src/match.c +++ b/src/match.c @@ -464,7 +464,7 @@ static bool component_hint_date_comparation(component_data_t *a, component_data_ // 7. URL ranking and binary purl matching // When URL ranking is enabled (rank < COMPONENT_DEFAULT_RANK), use ranking metrics // Lower rank values indicate higher quality/more authoritative sources - if (b->rank < COMPONENT_DEFAULT_RANK || a->rank < COMPONENT_DEFAULT_RANK) + if (component_rank_max >=0 && (b->rank < COMPONENT_DEFAULT_RANK || a->rank < COMPONENT_DEFAULT_RANK)) { // 7.1. Binary file to purl matching // Check if the component's purl matches what would be expected for a binary file diff --git a/src/report.c b/src/report.c index fb1cc37..2df0e9f 100644 --- a/src/report.c +++ b/src/report.c @@ -337,7 +337,7 @@ bool print_json_match(struct match_data_t * match) ranking_enabled = true; printf("\"id\": \"%s\"", matchtypes[match->type]); - if (!match->scan_ower->snippet_adjust_tolerance && match->type == MATCH_SNIPPET) + if (match->type == MATCH_SNIPPET) printf(",\"hits\": %d", match->hits); printf(",\"lines\": \"%s\"", match->line_ranges);