fix(parser/diff): add cases on non-accepted
This commit is contained in:
parent
505f776e6e
commit
96ed65f05d
|
@ -63,8 +63,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
}
|
||||
comment += conf.FailComment
|
||||
comment += "Executor status not `Accepted`\n"
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
for _, output := range caseConf.Outputs {
|
||||
answer, err := os.ReadFile(output.AnswerPath)
|
||||
if err != nil {
|
||||
|
@ -100,7 +99,11 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
}
|
||||
// Generate diff block with surrounding context
|
||||
diffOutput := generateDiffWithContext(
|
||||
stdoutLines, resultLines, diffOps, output.MaxDiffLength)
|
||||
stdoutLines,
|
||||
resultLines,
|
||||
diffOps,
|
||||
output.MaxDiffLength,
|
||||
)
|
||||
diffOutput = strings.TrimSuffix(diffOutput, "\n \n")
|
||||
comment += fmt.Sprintf(
|
||||
"```diff\n%s\n```\n",
|
||||
|
@ -111,6 +114,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
res = append(res, stage.ParserResult{
|
||||
Score: score,
|
||||
Comment: comment,
|
||||
|
|
Loading…
Reference in New Issue
Block a user