Skip to content

Commit

Permalink
feat(static-html): Order issues by their severity
Browse files Browse the repository at this point in the history
Adjust the issue summary table (rows), so that errors come first, then
warning, then hints.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Apr 26, 2024
1 parent 34c7ee7 commit e844f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ <h3>Packages</h3>
<td>Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0</td>
<td><a href="#Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0">Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0</a><ul>
<li>
<p>2024-04-25T07:44:20.725613974Z [HINT]: Gradle - Example hint.</p>
<p>2024-04-25T07:44:20.725613974Z [ERROR]: Gradle - Example error.</p>
<p></p>
</li>
<details>
Expand Down Expand Up @@ -581,7 +581,7 @@ <h3>Packages</h3>
</ul>
</details>
<li>
<p>2024-04-25T07:44:20.725613974Z [ERROR]: Gradle - Example error.</p>
<p>2024-04-25T07:44:20.725613974Z [HINT]: Gradle - Example hint.</p>
<p></p>
</li>
<details>
Expand Down Expand Up @@ -652,7 +652,7 @@ <h3>Packages</h3>
</ul>
</details>
<li>
<p>2024-04-25T07:44:20.725613974Z [HINT]: FakeScanner - Example hint.</p>
<p>2024-04-25T07:44:20.725613974Z [ERROR]: FakeScanner - Example error.</p>
<p></p>
</li>
<details>
Expand Down Expand Up @@ -684,7 +684,7 @@ <h3>Packages</h3>
</ul>
</details>
<li>
<p>2024-04-25T07:44:20.725613974Z [ERROR]: FakeScanner - Example error.</p>
<p>2024-04-25T07:44:20.725613974Z [HINT]: FakeScanner - Example hint.</p>
<p></p>
</li>
<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ internal object ReportTableModelMapper {
)

val isRowExcluded = input.ortResult.isExcluded(row.id)
val unresolvedAnalyzerIssues = row.analyzerIssues.filterUnresolved()
val unresolvedScanIssues = row.scanIssues.filterUnresolved()
val unresolvedAnalyzerIssues = row.analyzerIssues.filterUnresolved().sortedByDescending { it.severity }
val unresolvedScanIssues = row.scanIssues.filterUnresolved().sortedByDescending { it.severity }

if ((unresolvedAnalyzerIssues.isNotEmpty() || unresolvedScanIssues.isNotEmpty())
&& !isRowExcluded
Expand Down

0 comments on commit e844f82

Please sign in to comment.