Skip to content

Commit

Permalink
fix: Do not show duplicate license issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Sep 24, 2019
1 parent 028883a commit 7894147
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ export function formatIssuesWithRemediation(
paths: vuln.list.map((v) => v.from),
};

basicVulnInfo[vuln.metadata.id] = vulnData;

if (vulnData.type === 'license') {
basicLicenseInfo[vuln.metadata.id] = vulnData;
} else {
basicVulnInfo[vuln.metadata.id] = vulnData;
}
}

Expand Down Expand Up @@ -322,6 +322,12 @@ function constructUnfixableText(unresolved: IssueData[], basicVulnInfo: Record<s
) + `${extraInfo}`);
}

if (unfixableIssuesTextArray.length === 1) {
// seems we still only have
// the initial section title, so nothing to return
return [];
}

return unfixableIssuesTextArray;
}

Expand Down

0 comments on commit 7894147

Please sign in to comment.