Finalize structured diagnostic aggregation
This commit is contained in:
@@ -50,13 +50,13 @@ func (v *Validator) Validate(_ context.Context, req contracts.TypedValidationReq
|
||||
}
|
||||
citedTexts[turnIndex] = citedText
|
||||
}
|
||||
warnings := make([]contracts.Warning, 0)
|
||||
warnings := make([]diagnostics.Finding, 0)
|
||||
for turnIndex, turn := range req.Value.CombatTurns {
|
||||
citedText := citedTexts[turnIndex]
|
||||
if actorAppearsInCitedText(citedText, turn.Actor) {
|
||||
continue
|
||||
}
|
||||
warnings = append(warnings, contracts.Warning{
|
||||
warnings = append(warnings, diagnostics.Finding{
|
||||
Scope: fmt.Sprintf("combat_turns[%d]", turnIndex),
|
||||
ReasonCode: ReasonCode,
|
||||
Message: diagnostics.Aggregate("combat turn not near source", []string{
|
||||
|
||||
Reference in New Issue
Block a user