JOJ3/internal/parser/diff/meta.go
张泊明518370910136 7f7eead5f7
All checks were successful
submodules sync / sync (push) Successful in 55s
build / build (push) Successful in 2m34s
build / trigger-build-image (push) Successful in 14s
feat(parser/diff): default max diff lines 50
2025-03-28 08:58:48 -04:00

34 lines
882 B
Go

// Package diff implements string comparison functionality for the specific
// output files, comparing then with expected answers and assigning scores based
// on results.
package diff
import "github.com/joint-online-judge/JOJ3/internal/stage"
var name = "diff"
type Conf struct {
PassComment string `default:"🥳Passed!\n"`
FailComment string `default:"🧐Failed...\n"`
FailOnNotAccepted bool `default:"true"`
ForceQuitOnFailed bool `default:"false"`
Cases []struct {
Outputs []struct {
Score int
FileName string
AnswerPath string
CompareSpace bool
AlwaysHide bool
ForceQuitOnDiff bool
MaxDiffLength int `default:"2048"` // just for reference
MaxDiffLines int `default:"50"` // just for reference
}
}
}
type Diff struct{}
func init() {
stage.RegisterParser(name, &Diff{})
}