77 references to DiagnosticKind
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Squiggles\ErrorSquiggleProducerTests.cs (2)
326var spans = await TestDiagnosticTagProducer<DiagnosticsSquiggleTaggerProvider, IErrorTag>.GetErrorsFromUpdateSource(workspace, updateArgs, DiagnosticKind.CompilerSyntax); 370var spans = await TestDiagnosticTagProducer<DiagnosticsSquiggleTaggerProvider, IErrorTag>.GetErrorsFromUpdateSource(workspace, updateArgs, DiagnosticKind.CompilerSyntax);
Microsoft.CodeAnalysis.EditorFeatures (9)
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.PullDiagnosticsTaggerProvider.cs (5)
42CreateDiagnosticsTaggerProvider(DiagnosticKind.CompilerSyntax), 43CreateDiagnosticsTaggerProvider(DiagnosticKind.CompilerSemantic), 44CreateDiagnosticsTaggerProvider(DiagnosticKind.AnalyzerSyntax), 45CreateDiagnosticsTaggerProvider(DiagnosticKind.AnalyzerSemantic)); 49SingleDiagnosticKindPullTaggerProvider CreateDiagnosticsTaggerProvider(DiagnosticKind diagnosticKind)
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (4)
33/// cref="DiagnosticKind"/>. It is itself never exported directly, but it it is used by the <see 35/// cref="DiagnosticKind"/> to produce all the diagnostics for that feature. 39private readonly DiagnosticKind _diagnosticKind; 49DiagnosticKind diagnosticKind,
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (9)
Diagnostics\MockDiagnosticAnalyzerService.cs (8)
24private readonly ArrayBuilder<(DiagnosticData Diagnostic, DiagnosticKind KindFilter)> _diagnosticsWithKindFilter; 32_diagnosticsWithKindFilter = ArrayBuilder<(DiagnosticData Diagnostic, DiagnosticKind KindFilter)>.GetInstance(); 35public void AddDiagnostic(DiagnosticData diagnostic, DiagnosticKind diagnosticKind) 38public void AddDiagnostics(ImmutableArray<DiagnosticData> diagnostics, DiagnosticKind diagnosticKind) 67public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(TextDocument document, TextSpan? range, Func<string, bool>? shouldIncludeDiagnostic, bool includeCompilerDiagnostics, bool includeSuppressedDiagnostics = true, CodeActionRequestPriority priority = CodeActionRequestPriority.None, Func<string, IDisposable?>? addOperationScope = null, DiagnosticKind diagnosticKind = DiagnosticKind.All, CancellationToken cancellationToken = default) 76public Task<(ImmutableArray<DiagnosticData> diagnostics, bool upToDate)> TryGetDiagnosticsForSpanAsync(TextDocument document, TextSpan range, Func<string, bool>? shouldIncludeDiagnostic, bool includeSuppressedDiagnostics = false, CodeActionRequestPriority priority = CodeActionRequestPriority.None, DiagnosticKind diagnosticKind = DiagnosticKind.All, CancellationToken cancellationToken = default)
Squiggles\TestDiagnosticTagProducer.cs (1)
35internal static async Task<IList<ITagSpan<TTag>>> GetErrorsFromUpdateSource(TestWorkspace workspace, DiagnosticsUpdatedArgs updateArgs, DiagnosticKind diagnosticKind)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
Diagnostics\DiagnosticsSquiggleTaggerProviderTests.cs (10)
127[InlineData(DiagnosticKind.CompilerSyntax)] 128[InlineData(DiagnosticKind.CompilerSemantic)] 129[InlineData(DiagnosticKind.AnalyzerSyntax)] 130[InlineData(DiagnosticKind.AnalyzerSemantic)] 131internal async Task TestWithMockDiagnosticService_TaggerProviderCreatedBeforeInitialDiagnosticsReported(DiagnosticKind diagnosticKind) 171[InlineData(DiagnosticKind.CompilerSyntax)] 172[InlineData(DiagnosticKind.CompilerSemantic)] 173[InlineData(DiagnosticKind.AnalyzerSyntax)] 174[InlineData(DiagnosticKind.AnalyzerSemantic)] 175internal async Task TestWithMockDiagnosticService_TaggerProviderCreatedAfterInitialDiagnosticsReported(DiagnosticKind diagnosticKind)
Diagnostics\MockDiagnosticService.cs (1)
60internal void CreateDiagnosticAndFireEvents(Workspace workspace, MockDiagnosticAnalyzerService analyzerService, Location location, DiagnosticKind diagnosticKind)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (10)
Diagnostics\DiagnosticServiceTests.vb (10)
2335Friend Async Function TestGetDiagnosticsForDiagnosticKindAsync(diagnosticKind As DiagnosticKind) As Task 2377Dim all = diagnosticKind = DiagnosticKind.All 2379If all OrElse diagnosticKind = DiagnosticKind.CompilerSyntax Then 2384If all OrElse diagnosticKind = DiagnosticKind.CompilerSemantic Then 2389If all OrElse diagnosticKind = DiagnosticKind.AnalyzerSyntax Then 2394If all OrElse diagnosticKind = DiagnosticKind.AnalyzerSemantic Then 2445Dim diagnostics = Await diagnosticService.GetDiagnosticsForSpanAsync(document, root.FullSpan, diagnosticKind:=DiagnosticKind.CompilerSemantic) 2450diagnostics = Await diagnosticService.GetDiagnosticsForSpanAsync(document, root.FullSpan, diagnosticKind:=DiagnosticKind.CompilerSyntax) 2455diagnostics = Await diagnosticService.GetDiagnosticsForSpanAsync(document, root.FullSpan, diagnosticKind:=DiagnosticKind.AnalyzerSyntax) 2460diagnostics = Await diagnosticService.GetDiagnosticsForSpanAsync(document, root.FullSpan, diagnosticKind:=DiagnosticKind.AnalyzerSemantic)
Microsoft.CodeAnalysis.Features (9)
Diagnostics\IDiagnosticAnalyzerService.cs (9)
77/// Use <see cref="GetDiagnosticsForSpanAsync(TextDocument, TextSpan?, Func{string, bool}?, bool, bool, CodeActionRequestPriority, Func{string, IDisposable?}?, DiagnosticKind, CancellationToken)"/> 84DiagnosticKind diagnosticKind = DiagnosticKind.All, 100DiagnosticKind diagnosticKind = DiagnosticKind.All, 109DiagnosticKind diagnosticKind = DiagnosticKind.All, 126DiagnosticKind diagnosticKind = DiagnosticKind.All,
Microsoft.CodeAnalysis.LanguageServer.Protocol (23)
Features\Diagnostics\DiagnosticAnalyzerService.cs (3)
77DiagnosticKind diagnosticKinds = DiagnosticKind.All, 105DiagnosticKind diagnosticKinds,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (10)
27Func<string, IDisposable?>? addOperationScope, DiagnosticKind diagnosticKinds, CancellationToken cancellationToken) 44DiagnosticKind diagnosticKinds, 81private readonly DiagnosticKind _diagnosticKind; 95DiagnosticKind diagnosticKinds, 163DiagnosticKind diagnosticKind) 199if (_diagnosticKind != DiagnosticKind.All) 203? _diagnosticKind == DiagnosticKind.CompilerSyntax 204: _diagnosticKind == DiagnosticKind.AnalyzerSyntax; 206? _diagnosticKind == DiagnosticKind.CompilerSemantic 207: _diagnosticKind == DiagnosticKind.AnalyzerSemantic;
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (2)
15public DiagnosticKind DiagnosticKind { get; } 17public DocumentDiagnosticSource(DiagnosticKind diagnosticKind, Document document)
Handler\Diagnostics\DocumentPullDiagnosticHandler.cs (7)
81PullDiagnosticCategories.DocumentCompilerSyntax => DiagnosticKind.CompilerSyntax, 82PullDiagnosticCategories.DocumentCompilerSemantic => DiagnosticKind.CompilerSemantic, 83PullDiagnosticCategories.DocumentAnalyzerSyntax => DiagnosticKind.AnalyzerSemantic, 84PullDiagnosticCategories.DocumentAnalyzerSemantic => DiagnosticKind.AnalyzerSemantic, 86null => DiagnosticKind.All, 88_ => (DiagnosticKind?)null, 103DiagnosticKind diagnosticKind, bool taskList, RequestContext context, IGlobalOptionService globalOptions)
Handler\Diagnostics\Public\PublicDocumentPullDiagnosticsHandler.cs (1)
89return ValueTaskFactory.FromResult(DocumentPullDiagnosticHandler.GetDiagnosticSources(DiagnosticKind.All, taskList: false, context, GlobalOptions));
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (4)
670Public Function GetDiagnosticsForSpanAsync(document As TextDocument, range As TextSpan?, shouldIncludeDiagnostic As Func(Of String, Boolean), includeCompilerDiagnostics As Boolean, Optional includeSuppressedDiagnostics As Boolean = False, Optional priority As CodeActionRequestPriority = CodeActionRequestPriority.None, Optional addOperationScope As Func(Of String, IDisposable) = Nothing, Optional diagnosticKinds As DiagnosticKind = DiagnosticKind.All, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetDiagnosticsForSpanAsync 702Public Function TryGetDiagnosticsForSpanAsync(document As TextDocument, range As TextSpan, shouldIncludeDiagnostic As Func(Of String, Boolean), Optional includeSuppressedDiagnostics As Boolean = False, Optional priority As CodeActionRequestPriority = CodeActionRequestPriority.None, Optional diagnosticKinds As DiagnosticKind = DiagnosticKind.All, Optional cancellationToken As CancellationToken = Nothing) As Task(Of (diagnostics As ImmutableArray(Of DiagnosticData), upToDate As Boolean)) Implements IDiagnosticAnalyzerService.TryGetDiagnosticsForSpanAsync