Reject conflicting merged corrections

This commit is contained in:
demiliani 2026-09-25 12:36:01 +02:00
parent 8c3216eec4
commit dfe87111a8
2 changed files with 14 additions and 0 deletions

View file

@ -204,8 +204,12 @@ function Get-SemanticErrors {
}
$sameCorrection = Test-SameCorrection $RolledFinding $LeafFinding
$correctionsConflict = (Test-HasProperty $RolledFinding 'suggested-code') -and
(Test-HasProperty $LeafFinding 'suggested-code') -and
$RolledFinding.'suggested-code' -cne $LeafFinding.'suggested-code'
$explicitCrossRuleMerge = $leafReferences.Count -and
$rolledReferences.Count -gt $leafReferences.Count -and
-not $correctionsConflict -and
(Test-ReferencesInclude $rolledReferences $leafReferences)
if (-not $sameCorrection -and -not $explicitCrossRuleMerge) {
return $false