diff --git a/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html b/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html index 94c911c1c0bc3..fa3770fb497f5 100644 --- a/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html +++ b/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html @@ -456,6 +456,7 @@
Issues from excluded components are not shown in this summary.
+# | +Package | +Message | +
---|---|---|
1 | +Maven:org.apache.commons:commons-text:1.1 | +
+ Unknown time [ERROR]: VulnerableCode - Example advisor error. +
+
+ How to fix+
|
+
2 | +Maven:org.apache.commons:commons-text:1.1 | +
+ Unknown time [WARNING]: VulnerableCode - Example advisor warning. +
+
+ How to fix+
|
+
3 | +Maven:org.apache.commons:commons-text:1.1 | +
+ Unknown time [HINT]: VulnerableCode - Example advisor hint. +
+
+ How to fix+
|
+
The project is excluded for the following reason(s):
diff --git a/plugins/reporters/static-html/src/main/kotlin/ReportTableModel.kt b/plugins/reporters/static-html/src/main/kotlin/ReportTableModel.kt index c663377d5e0f8..abca3a7d3d073 100644 --- a/plugins/reporters/static-html/src/main/kotlin/ReportTableModel.kt +++ b/plugins/reporters/static-html/src/main/kotlin/ReportTableModel.kt @@ -63,6 +63,11 @@ internal data class ReportTableModel( */ val scannerIssueSummary: IssueTable, + /** + * A [IssueTable] containing all advisor issues. + */ + val advisorIssueSummary: IssueTable, + /** * The [ProjectTable]s containing the dependencies for each [Project]. */ @@ -156,7 +161,8 @@ internal data class ReportTableModel( enum class Type { ANALYZER, - SCANNER + SCANNER, + ADVISOR } } diff --git a/plugins/reporters/static-html/src/main/kotlin/ReportTableModelMapper.kt b/plugins/reporters/static-html/src/main/kotlin/ReportTableModelMapper.kt index b3c31b55c5b35..448390d2727c3 100644 --- a/plugins/reporters/static-html/src/main/kotlin/ReportTableModelMapper.kt +++ b/plugins/reporters/static-html/src/main/kotlin/ReportTableModelMapper.kt @@ -116,6 +116,7 @@ internal object ReportTableModelMapper { ruleViolations, getAnalyzerIssueSummaryTable(input), getScannerIssueSummaryTable(input), + getAdvisorIssueSummaryTable(input), projectTables, labels ) @@ -191,6 +192,10 @@ private fun getScannerIssueSummaryTable(input: ReporterInput): IssueTable = input.ortResult.getScannerIssues(omitExcluded = true, omitResolved = true) .toIssueSummaryTable(IssueTable.Type.SCANNER, input) +private fun getAdvisorIssueSummaryTable(input: ReporterInput): IssueTable = + input.ortResult.getAdvisorIssues(omitExcluded = true, omitResolved = true) + .toIssueSummaryTable(IssueTable.Type.ADVISOR, input) + private fun Map