chore(parser/diff): double max diff length as it is for 2 files now
All checks were successful
submodules sync / sync (push) Successful in 1m11s
build / build (push) Successful in 2m51s
build / trigger-build-image (push) Successful in 11s

This commit is contained in:
张泊明518370910136 2025-07-19 18:35:25 -07:00
parent a16cf89244
commit 1c559ed2e5
No known key found for this signature in database
GPG Key ID: 134DACA8458EB0E3
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ type Output struct {
CompareSpace bool CompareSpace bool
AlwaysHide bool AlwaysHide bool
ForceQuitOnDiff bool ForceQuitOnDiff bool
MaxDiffLength int `default:"2048"` // just for reference MaxDiffLength int `default:"4096"` // just for reference
MaxDiffLines int `default:"50"` // just for reference MaxDiffLines int `default:"50"` // just for reference
HideCommonPrefix bool HideCommonPrefix bool
} }

View File

@ -119,7 +119,7 @@ func (d *Diff) processOutput(output Output, result stage.ExecutorResult, conf *C
// generateDiffComment generates a diff comment for the given strings. // generateDiffComment generates a diff comment for the given strings.
func (d *Diff) generateDiffComment(answerStr, resultStr string, output Output) string { func (d *Diff) generateDiffComment(answerStr, resultStr string, output Output) string {
if output.MaxDiffLength == 0 { // real default value if output.MaxDiffLength == 0 { // real default value
output.MaxDiffLength = 2048 output.MaxDiffLength = 4096
} }
if output.MaxDiffLines == 0 { // real default value if output.MaxDiffLines == 0 { // real default value
output.MaxDiffLines = 50 output.MaxDiffLines = 50