Compare commits

..

No commits in common. "6b99cc41a9fda8d7d4540123b10ac13446d93687" and "0b841dd730e1f424007dcc6b94bffdd799c93d86" have entirely different histories.

View File

@ -15,7 +15,7 @@ type Conf struct {
ShowMemory bool `default:"true"` ShowMemory bool `default:"true"`
ShowRunTime bool `default:"false"` ShowRunTime bool `default:"false"`
ShowFiles []string ShowFiles []string
MaxFileLength int `default:"65536"` MaxFilesLength int `default:"2048"`
} }
type ResultDetail struct{} type ResultDetail struct{}
@ -57,8 +57,8 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) (
content, ok := result.Files[file] content, ok := result.Files[file]
comment += fmt.Sprintf("File `%s`:\n", file) comment += fmt.Sprintf("File `%s`:\n", file)
if ok { if ok {
if conf.MaxFileLength > 0 && len(content) > conf.MaxFileLength { if conf.MaxFilesLength > 0 && len(content) > conf.MaxFilesLength {
content = content[:conf.MaxFileLength] + "\n\n(truncated)" content = content[:conf.MaxFilesLength] + "\n\n(truncated)"
} }
comment += fmt.Sprintf("```\n%s\n```\n", content) comment += fmt.Sprintf("```\n%s\n```\n", content)
} else { } else {