detekt / sarif4k

Kotlin data bindings for the Static Analysis Results Interchange Format (SARIF)
Apache License 2.0
16 stars 8 forks source link

Create a sarif merger #82

Closed BraisGabin closed 7 months ago

BraisGabin commented 8 months ago

It would be great to be able to merge two SarifSchema210 in a single one. I imagine the API to be something like this:

fun SarifSchema210.merge(other: SarifSchema210): SarifSchema210

If someone wants to merge more than two reports they can use Iterable.reduce.

More context about this issue here: https://github.com/detekt/detekt/pull/6894