feat(parser/diff): more hints in comments (#54)
This commit is contained in:
parent
bc733f3944
commit
b46e22471f
|
@ -72,7 +72,9 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
||||||
if compareChars(string(answer), result.Files[output.FileName],
|
if compareChars(string(answer), result.Files[output.FileName],
|
||||||
output.CompareSpace) {
|
output.CompareSpace) {
|
||||||
score += output.Score
|
score += output.Score
|
||||||
|
comment += "Pass!\n"
|
||||||
} else {
|
} else {
|
||||||
|
comment += "Fail!\n"
|
||||||
comment += fmt.Sprintf("Difference found in `%s`.\n",
|
comment += fmt.Sprintf("Difference found in `%s`.\n",
|
||||||
output.FileName)
|
output.FileName)
|
||||||
if !output.AlwaysHide {
|
if !output.AlwaysHide {
|
||||||
|
@ -92,6 +94,8 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
||||||
"```diff\n%s\n```\n",
|
"```diff\n%s\n```\n",
|
||||||
diffOutput,
|
diffOutput,
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
comment += "(Content hidden.)\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user