JOJ3/internal/parser/keyword/meta.go
张泊明518370910136 46f9cdd281
All checks were successful
submodules sync / sync (push) Successful in 47s
build / build (push) Successful in 2m22s
build / trigger-build-image (push) Successful in 11s
feat(parser/keyword): use stdout & stderr by default
2025-05-26 07:07:34 -04:00

27 lines
613 B
Go

// Package keyword implements keyword-based output analysis functionality.
// It evaluates output files by searching for specific keywords and assigns scores based on matches.
package keyword
import "github.com/joint-online-judge/JOJ3/internal/stage"
var name = "keyword"
type Match struct {
Keywords []string
Score int
MaxMatchCount int
}
type Conf struct {
Score int
Files []string `default:"[stdout,stderr]"`
ForceQuitOnDeduct bool `default:"false"`
Matches []Match
}
type Keyword struct{}
func init() {
stage.RegisterParser(name, &Keyword{})
}