feat(parser/resultstatus): 0 score on non-accepted status
This commit is contained in:
parent
12f2c93fb8
commit
6a7787a974
|
@ -21,18 +21,20 @@ func (*ResultStatus) Run(results []stage.ExecutorResult, confAny any) (
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, true, err
|
return nil, true, err
|
||||||
}
|
}
|
||||||
|
score := conf.Score
|
||||||
forceQuit := false
|
forceQuit := false
|
||||||
var res []stage.ParserResult
|
var res []stage.ParserResult
|
||||||
for _, result := range results {
|
for _, result := range results {
|
||||||
comment := conf.Comment
|
comment := conf.Comment
|
||||||
if result.Status != stage.Status(envexec.StatusAccepted) {
|
if result.Status != stage.Status(envexec.StatusAccepted) {
|
||||||
forceQuit = true
|
score = 0
|
||||||
comment = fmt.Sprintf(
|
comment = fmt.Sprintf(
|
||||||
"Unexpected executor status: %s.", result.Status,
|
"Unexpected executor status: %s.", result.Status,
|
||||||
)
|
)
|
||||||
|
forceQuit = true
|
||||||
}
|
}
|
||||||
res = append(res, stage.ParserResult{
|
res = append(res, stage.ParserResult{
|
||||||
Score: conf.Score,
|
Score: score,
|
||||||
Comment: comment,
|
Comment: comment,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user