Skip to content

Update for global usings in C# 10 - #4071

Open
sharwell wants to merge 6 commits into
DotNetAnalyzers:masterfrom
sharwell:global-usings
Open

Update for global usings in C# 10#4071
sharwell wants to merge 6 commits into
DotNetAnalyzers:masterfrom
sharwell:global-usings

Update SA1516 tests and documentation for global using directives

99a6955
Select commit
Loading
Failed to load commit list.
Azure Pipelines / DotNetAnalyzers.StyleCopAnalyzers failed Dec 6, 2025 in 39m 9s

Build #1.2.0-beta.706+197cd29d5a had test failures

Details

Tests

  • Failed: 33 (0.06%)
  • Passed: 58,124 (99.94%)
  • Other: 0 (0.00%)
  • Total: 58,157

Annotations

Check failure on line 268 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

Build log #L268

PowerShell exited with code '1'.

Check failure on line 280 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

Build log #L280

PowerShell exited with code '1'.

Check failure on line 11 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

Build log #L11

Artifact coverageResults-cs12 was not found for build 6450.

Check failure on line 268 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

Build log #L268

PowerShell exited with code '1'.

Check failure on line 1 in StyleCop.Analyzers.Test.CSharp12.LayoutRules.SA1516UsingGroupsCSharp12UnitTests.TestBlankLineRequiredBetweenGlobalAndLocalUsingGroupsAsync

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

StyleCop.Analyzers.Test.CSharp12.LayoutRules.SA1516UsingGroupsCSharp12UnitTests.TestBlankLineRequiredBetweenGlobalAndLocalUsingGroupsAsync

Microsoft.CodeAnalysis.Testing.Verifiers.EqualWithMessageException : Context: Diagnostics of test state\r\nExpected diagnostic to start on line \"4\" was actually on line \"6\"\r\n\r\nExpected diagnostic:\r\n    // /0/Test0.cs(4,1,4,17): warning SA1516: Using directives should be separated by blank line\r\nVerifyCS.Diagnostic().WithSpan(4, 1, 4, 17),\r\n\r\nActual diagnostic:\r\n    // /0/Test0.cs(6,1): error CS8805: Program using top-level statements must be an executable.\r\nDiagnosticResult.CompilerError(\"CS8805\").WithSpan(6, 1, 6, 21),\r\n\r\n\r\nAssert.Equal() Failure\r\nExpected: 3\r\nActual:   5
Raw output
   at Microsoft.CodeAnalysis.Testing.Verifiers.XUnitVerifier.Equal[T](T expected, T actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Testing.Verifiers.XUnit/XUnitVerifier.cs:line 49
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyLinePosition(ImmutableArray`1 analyzers, Diagnostic diagnostic, DiagnosticResult expectedDiagnostic, LinePosition actualLinePosition, LinePosition expectedLinePosition, String positionText, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 796
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticLocation(ImmutableArray`1 analyzers, Diagnostic diagnostic, DiagnosticResult expectedDiagnostic, Location actual, DiagnosticLocation expected, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 786
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticResults(IEnumerable`1 actualResults, ImmutableArray`1 analyzers, DiagnosticResult[] expectedResults, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 560
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifyDiagnosticsAsync>d__67.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 449
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 305
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 172
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at StyleCop.Analyzers.Test.CSharp10.LayoutRules.SA1516UsingGroupsCSharp10UnitTests.<TestBlankLineRequiredBetweenGlobalAndLocalUsingGroupsAsync>d__0.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp10\LayoutRules\SA1516UsingGroupsCSharp10UnitTests.cs:line 40
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.Get

Check failure on line 1 in StyleCop.Analyzers.Test.CSharp12.OrderingRules.SA1208CSharp12UnitTests.TestGlobalAndLocalUsingDirectivesMaintainIndependentSystemOrderingAsync

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

StyleCop.Analyzers.Test.CSharp12.OrderingRules.SA1208CSharp12UnitTests.TestGlobalAndLocalUsingDirectivesMaintainIndependentSystemOrderingAsync

Microsoft.CodeAnalysis.Testing.Verifiers.EqualWithMessageException : Context: Diagnostics of test state\r\nMismatch between number of diagnostics returned, expected \"2\" actual \"4\"\r\n\r\nDiagnostics:\r\n// /0/Test2.cs(3,1): warning SA1208: Using directive for 'System.Text' should appear before directive for 'NameSpaceA'\r\nVerifyCS.Diagnostic().WithSpan(\"/0/Test2.cs\", 3, 1, 3, 26).WithArguments(\"System.Text\", \"NameSpaceA\"),\r\n// /0/Test2.cs(4,1): warning SA1208: Using directive for 'System' should appear before directive for 'NameSpaceA'\r\nVerifyCS.Diagnostic().WithSpan(\"/0/Test2.cs\", 4, 1, 4, 21).WithArguments(\"System\", \"NameSpaceA\"),\r\n// /0/Test2.cs(7,1): warning SA1208: Using directive for 'System.IO' should appear before directive for 'NameSpaceA'\r\nVerifyCS.Diagnostic().WithSpan(\"/0/Test2.cs\", 7, 1, 7, 17).WithArguments(\"System.IO\", \"NameSpaceA\"),\r\n// /0/Test2.cs(8,1): warning SA1208: Using directive for 'System' should appear before directive for 'NameSpaceA'\r\nVerifyCS.Diagnostic().WithSpan(\"/0/Test2.cs\", 8, 1, 8, 14).WithArguments(\"System\", \"NameSpaceA\"),\r\n\r\n\r\nAssert.Equal() Failure\r\nExpected: 2\r\nActual:   4
Raw output
   at Microsoft.CodeAnalysis.Testing.Verifiers.XUnitVerifier.Equal[T](T expected, T actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Testing.Verifiers.XUnit/XUnitVerifier.cs:line 49
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticResults(IEnumerable`1 actualResults, ImmutableArray`1 analyzers, DiagnosticResult[] expectedResults, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 546
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifyDiagnosticsAsync>d__67.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 449
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 305
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 172
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at StyleCop.Analyzers.Test.CSharp10.OrderingRules.SA1208CSharp10UnitTests.<TestGlobalAndLocalUsingDirectivesMaintainIndependentSystemOrderingAsync>d__3.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp10\OrderingRules\SA1208CSharp10UnitTests.cs:line 137
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.C

Check failure on line 1 in StyleCop.Analyzers.Test.CSharp12.OrderingRules.SA1216CSharp12UnitTests.TestOrderingResetsBetweenGlobalAndLocalStaticAndAliasUsingDirectivesAsync

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

StyleCop.Analyzers.Test.CSharp12.OrderingRules.SA1216CSharp12UnitTests.TestOrderingResetsBetweenGlobalAndLocalStaticAndAliasUsingDirectivesAsync

Microsoft.CodeAnalysis.Testing.Verifiers.EqualWithMessageException : Context: Diagnostics of test state\r\nMismatch between number of diagnostics returned, expected \"2\" actual \"1\"\r\n\r\nDiagnostics:\r\n// /0/Test0.cs(2,1): warning SA1216: Using static directives should be placed at the correct location\r\nVerifyCS.Diagnostic().WithSpan(2, 1, 2, 33),\r\n\r\n\r\nAssert.Equal() Failure\r\nExpected: 2\r\nActual:   1
Raw output
   at Microsoft.CodeAnalysis.Testing.Verifiers.XUnitVerifier.Equal[T](T expected, T actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Testing.Verifiers.XUnit/XUnitVerifier.cs:line 49
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticResults(IEnumerable`1 actualResults, ImmutableArray`1 analyzers, DiagnosticResult[] expectedResults, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 546
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifyDiagnosticsAsync>d__67.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 449
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 305
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 172
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at StyleCop.Analyzers.Test.CSharp10.OrderingRules.SA1216CSharp10UnitTests.<TestOrderingResetsBetweenGlobalAndLocalStaticAndAliasUsingDirectivesAsync>d__3.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp10\OrderingRules\SA1216CSharp10UnitTests.cs:line 116
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime

Check failure on line 1 in StyleCop.Analyzers.Test.CSharp12.OrderingRules.SA1217CSharp12UnitTests.TestAlphabeticalOrderingEnforcedSeparatelyForGlobalAndLocalStaticUsingDirectivesAsync

See this annotation in the file changed.

@azure-pipelines azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers

StyleCop.Analyzers.Test.CSharp12.OrderingRules.SA1217CSharp12UnitTests.TestAlphabeticalOrderingEnforcedSeparatelyForGlobalAndLocalStaticUsingDirectivesAsync

Microsoft.CodeAnalysis.Testing.Verifiers.EqualWithMessageException : Context: Diagnostics of test state\r\nMismatch between number of diagnostics returned, expected \"2\" actual \"1\"\r\n\r\nDiagnostics:\r\n// /0/Test0.cs(2,1): warning SA1217: The using static directive for 'System.Math' should appear after the using static directive for 'System.Array'\r\nVerifyCS.Diagnostic().WithSpan(2, 1, 2, 33).WithArguments(\"System.Math\", \"System.Array\"),\r\n\r\n\r\nAssert.Equal() Failure\r\nExpected: 2\r\nActual:   1
Raw output
   at Microsoft.CodeAnalysis.Testing.Verifiers.XUnitVerifier.Equal[T](T expected, T actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Testing.Verifiers.XUnit/XUnitVerifier.cs:line 49
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticResults(IEnumerable`1 actualResults, ImmutableArray`1 analyzers, DiagnosticResult[] expectedResults, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 546
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifyDiagnosticsAsync>d__67.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 449
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 305
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 172
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at StyleCop.Analyzers.Test.CSharp10.OrderingRules.SA1217CSharp10UnitTests.<TestAlphabeticalOrderingEnforcedSeparatelyForGlobalAndLocalStaticUsingDirectivesAsync>d__3.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp10\OrderingRules\SA1217CSharp10UnitTests.cs:line 118
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at Sy