File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
utbot-framework/src/main/kotlin/org/utbot/sarif Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,17 @@ class SarifReport(
100
100
* Between two [SarifResult]s with the same `ruleId` and `locations`
101
101
* it chooses the one with the shorter length of the execution trace.
102
102
*/
103
- private fun minimizeResults (sarifResults : List <SarifResult >): List <SarifResult > =
104
- sarifResults.groupBy { sarifResult ->
103
+ private fun minimizeResults (sarifResults : List <SarifResult >): List <SarifResult > {
104
+ val groupedResults = sarifResults.groupBy { sarifResult ->
105
105
Pair (sarifResult.ruleId, sarifResult.locations)
106
- }.map { (_, sarifResultsGroup) ->
107
- sarifResultsGroup.minByOrNull { sarifResult ->
108
- sarifResult.totalCodeFlowLocations()
109
- }!!
110
106
}
107
+ val minimizedResults = groupedResults.map { (_, sarifResultsGroup) ->
108
+ sarifResultsGroup.minByOrNull { sarifResult ->
109
+ sarifResult.totalCodeFlowLocations()
110
+ }!!
111
+ }
112
+ return minimizedResults
113
+ }
111
114
112
115
private fun processUncheckedException (
113
116
method : UtMethod <* >,
You can’t perform that action at this time.
0 commit comments