fix(parser/elf): output format
All checks were successful
submodules sync / sync (push) Successful in 1m7s
build / build (push) Successful in 3m0s
build / trigger-build-image (push) Successful in 14s

This commit is contained in:
张泊明518370910136 2025-06-17 03:17:37 -04:00
parent f7bf12dc57
commit 18cd2a8c4d
GPG Key ID: D47306D7062CDA9D

View File

@ -48,7 +48,7 @@ func (p *Elf) parse(executorResult stage.ExecutorResult, conf Conf) stage.Parser
// "<binders>:\n<context> below reaches a parentheses depths of <depths>:\n<code>" // "<binders>:\n<context> below reaches a parentheses depths of <depths>:\n<code>"
comment += fmt.Sprintf( comment += fmt.Sprintf(
"%s:\n%s below reaches a parentheses depths of %d:\n"+ "%s:\n%s below reaches a parentheses depths of %d:\n"+
"```%s\n```\n", "%s\n",
caseObj.Binders, caseObj.Binders,
caseObj.Context, caseObj.Context,
caseObj.Depths, caseObj.Depths,
@ -59,7 +59,7 @@ func (p *Elf) parse(executorResult stage.ExecutorResult, conf Conf) stage.Parser
comment += fmt.Sprintf( comment += fmt.Sprintf(
"%s:\n%s below excceeds a code length "+ "%s:\n%s below excceeds a code length "+
"upper bound with %d (weighed: %f):\n"+ "upper bound with %d (weighed: %f):\n"+
"```%s\n```\n", "%s\n",
caseObj.Binders, caseObj.Binders,
caseObj.Context, caseObj.Context,
caseObj.Plain, caseObj.Plain,
@ -69,7 +69,7 @@ func (p *Elf) parse(executorResult stage.ExecutorResult, conf Conf) stage.Parser
case "OverArity": case "OverArity":
// "<binders>:\n<context> below hits <detail>:\n<code>" // "<binders>:\n<context> below hits <detail>:\n<code>"
comment += fmt.Sprintf( comment += fmt.Sprintf(
"%s:\n%s below hits %s:\n```%s\n```\n", "%s:\n%s below hits %s:\n%s\n",
caseObj.Binders, caseObj.Binders,
caseObj.Context, caseObj.Context,
caseObj.Detail, caseObj.Detail,
@ -86,8 +86,8 @@ func (p *Elf) parse(executorResult stage.ExecutorResult, conf Conf) stage.Parser
// "The code below has a similarity rate of <similarity_rate>:\n- <context1>:\n\t<code1>\n- <context2>:\n\t<code2>" // "The code below has a similarity rate of <similarity_rate>:\n- <context1>:\n\t<code1>\n- <context2>:\n\t<code2>"
comment += fmt.Sprintf( comment += fmt.Sprintf(
"The code below has a similarity rate of %f:\n"+ "The code below has a similarity rate of %f:\n"+
"- %s:\n```%s\n```\n"+ "- %s:\n%s\n"+
"- %s:\n```%s\n```\n", "- %s:\n%s\n",
caseObj.SimilarityRate, caseObj.SimilarityRate,
context0, context0,
code0, code0,