SA1402: Include only relevant using statements #3873
Build #1.2.0-beta.617+ge990e709c7 had test failures
Details
- Failed: 156 (0.33%)
- Passed: 47,786 (99.67%)
- Other: 0 (0.00%)
- Total: 47,942
Annotations
Check failure on line 11 in Build log
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
Build log #L11
Artifact coverageResults-cs12 was not found for build 6259.
Check failure on line 702 in Build log
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
Build log #L702
PowerShell exited with code '1'.
Check failure on line 492 in Build log
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
Build log #L492
PowerShell exited with code '1'.
Check failure on line 11 in Build log
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
Build log #L11
Artifact coverageResults-cs8 was not found for build 6259.
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
StyleCop.Analyzers.Test.MaintainabilityRules.SA1403UnitTests.TestCodeFixRemovesUnnecessaryUsingsFromSecondFileOnlyAsync
System.InvalidOperationException : The markup location '#0' was not found in the input.
Raw output
at Microsoft.CodeAnalysis.Testing.DiagnosticResult.WithAppliedMarkupLocations(ImmutableDictionary`2 markupLocations) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DiagnosticResult.cs:line 387
at Microsoft.CodeAnalysis.Testing.SolutionState.WithProcessedMarkup(MarkupOptions markupOptions, DiagnosticDescriptor defaultDiagnostic, ImmutableArray`1 supportedDiagnostics, ImmutableArray`1 fixableDiagnostics, String defaultPath) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/SolutionState.cs:line 330
at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 299
--- 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.MaintainabilityRules.FileMayOnlyContainTestBase.<TestCodeFixRemovesUnnecessaryUsingsFromSecondFileOnlyAsync>d__17.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test\MaintainabilityRules\FileMayOnlyContainTestBase.cs:line 470
--- 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.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
StyleCop.Analyzers.Test.MaintainabilityRules.SA1403UnitTests.TestCodeWithSameConditionalCompilationDirectivesAsync
System.InvalidOperationException : The markup location '#0' was not found in the input.
Raw output
at Microsoft.CodeAnalysis.Testing.DiagnosticResult.WithAppliedMarkupLocations(ImmutableDictionary`2 markupLocations) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DiagnosticResult.cs:line 387
at Microsoft.CodeAnalysis.Testing.SolutionState.WithProcessedMarkup(MarkupOptions markupOptions, DiagnosticDescriptor defaultDiagnostic, ImmutableArray`1 supportedDiagnostics, ImmutableArray`1 fixableDiagnostics, String defaultPath) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/SolutionState.cs:line 330
at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 299
--- 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.MaintainabilityRules.FileMayOnlyContainTestBase.<TestCodeWithSameConditionalCompilationDirectivesAsync>d__21.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test\MaintainabilityRules\FileMayOnlyContainTestBase.cs:line 694
--- 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.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
StyleCop.Analyzers.Test.MaintainabilityRules.SA1403UnitTests.TestCodeFixWithDifferentPreprocessorDirectivesAsync
System.InvalidOperationException : The markup location '#0' was not found in the input.
Raw output
at Microsoft.CodeAnalysis.Testing.DiagnosticResult.WithAppliedMarkupLocations(ImmutableDictionary`2 markupLocations) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DiagnosticResult.cs:line 387
at Microsoft.CodeAnalysis.Testing.SolutionState.WithProcessedMarkup(MarkupOptions markupOptions, DiagnosticDescriptor defaultDiagnostic, ImmutableArray`1 supportedDiagnostics, ImmutableArray`1 fixableDiagnostics, String defaultPath) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/SolutionState.cs:line 330
at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 299
--- 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.MaintainabilityRules.FileMayOnlyContainTestBase.<TestCodeFixWithDifferentPreprocessorDirectivesAsync>d__22.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test\MaintainabilityRules\FileMayOnlyContainTestBase.cs:line 755
--- 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.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
azure-pipelines / DotNetAnalyzers.StyleCopAnalyzers
StyleCop.Analyzers.Test.MaintainabilityRules.SA1403UnitTests.TestCodeWithTrailingBlankLinesAfterUsingDirectiveAsync
System.InvalidOperationException : The markup location '#0' was not found in the input.
Raw output
at Microsoft.CodeAnalysis.Testing.DiagnosticResult.WithAppliedMarkupLocations(ImmutableDictionary`2 markupLocations) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DiagnosticResult.cs:line 387
at Microsoft.CodeAnalysis.Testing.SolutionState.WithProcessedMarkup(MarkupOptions markupOptions, DiagnosticDescriptor defaultDiagnostic, ImmutableArray`1 supportedDiagnostics, ImmutableArray`1 fixableDiagnostics, String defaultPath) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/SolutionState.cs:line 330
at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.<RunImplAsync>d__44.MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 299
--- 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.MaintainabilityRules.FileMayOnlyContainTestBase.<TestCodeWithTrailingBlankLinesAfterUsingDirectiveAsync>d__26.MoveNext() in D:\a\1\s\StyleCop.Analyzers\StyleCop.Analyzers.Test\MaintainabilityRules\FileMayOnlyContainTestBase.cs:line 994
--- 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.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()