Skip to content

Commit a523178

Browse files
committed
Ensure results are ordered by script line numbers
1 parent 4a369e2 commit a523178

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Engine/ScriptAnalyzer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,8 @@ public IEnumerable<DiagnosticRecord> AnalyzeSyntaxTree(
16391639

16401640
#endregion
16411641

1642-
IEnumerable<DiagnosticRecord> diagnosticsList = diagnostics;
1642+
// Need to reverse the concurrentbag to ensure that results are sorted in the increasing order of line numbers
1643+
IEnumerable<DiagnosticRecord> diagnosticsList = diagnostics.Reverse();
16431644

16441645
if (severity != null)
16451646
{

0 commit comments

Comments
 (0)