From 6a7787a974382d682080b99e19de01c51c6266ce Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Fri, 1 Nov 2024 03:08:20 -0400 Subject: [PATCH] feat(parser/resultstatus): 0 score on non-accepted status --- internal/parser/resultstatus/parser.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/parser/resultstatus/parser.go b/internal/parser/resultstatus/parser.go index cec2c10..79a60a1 100644 --- a/internal/parser/resultstatus/parser.go +++ b/internal/parser/resultstatus/parser.go @@ -21,18 +21,20 @@ func (*ResultStatus) Run(results []stage.ExecutorResult, confAny any) ( if err != nil { return nil, true, err } + score := conf.Score forceQuit := false var res []stage.ParserResult for _, result := range results { comment := conf.Comment if result.Status != stage.Status(envexec.StatusAccepted) { - forceQuit = true + score = 0 comment = fmt.Sprintf( "Unexpected executor status: %s.", result.Status, ) + forceQuit = true } res = append(res, stage.ParserResult{ - Score: conf.Score, + Score: score, Comment: comment, }) }