Skip to content

Commit 8d9460e

Browse files
committed
order json by erorr ID
1 parent 6caf136 commit 8d9460e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/ModVerify/Reporting/Reporters/JSON/JsonReporter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ private JsonVerificationReport CreateJsonReport(VerificationResult result)
3030
if (Settings.AggregateResults)
3131
{
3232
errors = result.Errors
33+
.OrderBy(x => x.Id)
3334
.GroupBy(x => new GroupKey(x.Asset, x.Id, x.VerifierChain))
3435
.Select<IGrouping<GroupKey, VerificationError>, JsonVerificationErrorBase>(g =>
3536
{
@@ -43,7 +44,9 @@ private JsonVerificationReport CreateJsonReport(VerificationResult result)
4344
}
4445
else
4546
{
46-
errors = result.Errors.Select(x => new JsonVerificationError(x));
47+
errors = result.Errors
48+
.OrderBy(x => x.Id)
49+
.Select(x => new JsonVerificationError(x));
4750
}
4851

4952
return new JsonVerificationReport

0 commit comments

Comments
 (0)