diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Helpers/DiagnosticVerifier.Helper.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Helpers/DiagnosticVerifier.Helper.cs index 549400f23..878009882 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Helpers/DiagnosticVerifier.Helper.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Helpers/DiagnosticVerifier.Helper.cs @@ -227,7 +227,7 @@ protected virtual Project CreateProject(string[] sources, string language = Lang /// . private static Diagnostic[] SortDistinctDiagnostics(IEnumerable diagnostics) { - return diagnostics.OrderBy(d => d.Location.SourceSpan.Start).ToArray(); + return diagnostics.OrderBy(d => d.Location.SourceSpan.Start).ThenBy(d => d.Id).ToArray(); } ///