JOJ3/internal/parser/diff/meta.go
张泊明518370910136 e34cba9b17
Some checks failed
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m44s
build / trigger-build-image (push) Has been cancelled
chore(parser/diff): remove newline in pass/fail comment
2025-06-21 13:13:42 -04:00

35 lines
911 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!"`
FailComment string `default:"🧐Failed..."`
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
HideCommonPrefix bool
}
}
}
type Diff struct{}
func init() {
stage.RegisterParser(name, &Diff{})
}