6 overrides of Id
Microsoft.CodeAnalysis (5)
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
49public override string Id => Descriptor.Id;
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
38public override string Id
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
85public override string Id
Diagnostic\DiagnosticWithInfo.cs (1)
59public override string Id
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
94public override string Id => _original.Id;
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
EvaluationContextBase.cs (1)
121public override string Id
232 references to Id
AnalyzerRunner (4)
DiagnosticAnalyzerRunner.cs (2)
157foreach (var group in allDiagnostics.GroupBy(diagnostic => diagnostic.Id).OrderBy(diagnosticGroup => diagnosticGroup.Key, StringComparer.OrdinalIgnoreCase)) 205.OrderBy(tuple => tuple.Item2.Id)
Program.cs (2)
153diagnosticStatistics.TryGetValue(diagnostic.Id, out var existing); 164diagnosticStatistics[diagnostic.Id] = (description, diagnostic.Descriptor.DefaultSeverity, existing.count + 1);
BuildActionTelemetryTable (1)
TelemetryExtensions.cs (1)
58return diagnostic.Id;
Microsoft.CodeAnalysis (31)
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
57_originalDiagnostic.Id,
CommandLine\SarifV1ErrorLogger.cs (2)
58_writer.Write("ruleId", diagnostic.Id); 61if (ruleKey != diagnostic.Id)
CommandLine\SarifV2ErrorLogger.cs (2)
56_writer.Write("ruleId", diagnostic.Id); 72_diagnosticIdsWithAnySourceSuppressions.Add(diagnostic.Id);
Diagnostic\CommonDiagnosticComparer.cs (3)
30return x.Location == y.Location && x.Id == y.Id; 40return Hash.Combine(obj.Location, obj.Id.GetHashCode());
Diagnostic\Diagnostic.cs (1)
363return new SuppressionInfo(this.Id, attribute);
Diagnostic\DiagnosticFormatter.cs (1)
101return string.Format("{0} {1}", prefix, diagnostic.Id);
Diagnostic\SuppressionDescriptor.cs (3)
22/// Identifier of the suppressed diagnostic, i.e. <see cref="Diagnostic.Id"/>. 37/// <param name="suppressedDiagnosticId">Identifier of the suppressed diagnostic, i.e. <see cref="Diagnostic.Id"/>. For example, compiler warning Id "CS0649".</param> 51/// <param name="suppressedDiagnosticId">Identifier of the suppressed diagnostic, i.e. <see cref="Diagnostic.Id"/>. For example, compiler warning Id "CS0649".</param>
Diagnostic\SuppressionInfo.cs (1)
13/// <see cref="Diagnostic.Id"/> of the suppressed diagnostic.
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
1066if (supportedSuppressions.Contains(s => s.SuppressedDiagnosticId == diagnostic.Id)) 1907suppressedDiagnosticIds?.Add(diagnostic.Id);
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
1282if (diagnostic.Id == AnalyzerExceptionDiagnosticId || diagnostic.Id == AnalyzerDriverExceptionDiagnosticId) 1311return exceptionDiagnostic.Id == other.Id &&
DiagnosticAnalyzer\AnalyzerManager.cs (1)
280if (descriptor.Id.Equals(diagnostic.Id, StringComparison.OrdinalIgnoreCase))
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
94public override string Id => _original.Id;
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
1730var message = string.Format(CodeAnalysisResources.NonReportedDiagnosticCannotBeSuppressed, suppression.SuppressedDiagnostic.Id);
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (5)
63throw new ArgumentException(string.Format(CodeAnalysisResources.UnsupportedDiagnosticReported, diagnostic.Id), nameof(diagnostic)); 66if (!UnicodeCharacterUtilities.IsValidIdentifier(diagnostic.Id)) 71throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticIdReported, diagnostic.Id), nameof(diagnostic)); 77VerifyDiagnosticLocationInCompilation(diagnostic.Id, diagnostic.Location, compilation); 83VerifyDiagnosticLocationInCompilation(diagnostic.Id, location, compilation);
DiagnosticAnalyzer\Suppression.cs (2)
23if (descriptor.SuppressedDiagnosticId != suppressedDiagnostic.Id) 26var message = string.Format(CodeAnalysisResources.InvalidDiagnosticSuppressionReported, suppressedDiagnostic.Id, descriptor.SuppressedDiagnosticId);
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
148var id = diagnostic.Id;
Microsoft.CodeAnalysis.CodeStyle (2)
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
546if (!idToPragmasMap.TryGetValue(diagnostic.Id, out var pragmasForIdInReverseOrder)) 588!idToSuppressMessageAttributesMap.TryGetValue(diagnostic.Id, out var suppressMessageAttributesForId))
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
AbstractAddExplicitCastCodeFixProvider.cs (2)
71semanticModel, root, diagnostic.Id, spanNode, cancellationToken, 211if (TryGetTargetTypeInfo(document, semanticModel, root, diagnostics[0].Id, spanNode, cancellationToken, out var potentialConversionTypes) &&
AbstractAddParameterCodeFixProvider.cs (2)
100if (TooManyArgumentsDiagnosticIds.Contains(diagnostic.Id)) 105if (CannotConvertDiagnosticIds.Contains(diagnostic.Id))
AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
235diagnosticId = diagnostics[0].Id; 242Debug.Assert(diagnosticId == diagnostic.Id);
DocumentExtensions.cs (1)
166diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (7)
AbstractDiagnosticProviderBasedUserDiagnosticTest.cs (2)
174var dxs = diagnostics.Where(d => ids.Contains(d.Id)).ToList(); 215diagnostics = diagnostics.WhereAsArray(d => d.Id == diagnosticId);
AbstractUserDiagnosticTest.cs (3)
66Assert.Equal(expected[0].Code, diagnostic.Id); 210var diagnosticIds = ImmutableHashSet.Create(diagnostic.Id); 264actualTextSpans = diagnostics.Where(d => d.Id == diagnosticId).Select(d => d.Location.SourceSpan).ToSet();
AbstractUserDiagnosticTest.FixAllDiagnosticProvider.cs (2)
34diags = diags.Where(diag => _diagnosticIds.Contains(diag.Id)); 50diags = diags.Where(diag => _diagnosticIds.Contains(diag.Id));
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpDiagnosticFilter.cs (1)
95d.Id,
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
62if (diagnostic.Id == CS0162)
CSharpUnnecessaryImportsProvider.cs (1)
35if (diagnostic.Id == "CS8019" &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
ConvertNamespaceCodeFixProvider.cs (2)
45diagnostic.Id switch 49_ => throw ExceptionUtilities.UnexpectedValue(diagnostic.Id),
CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
42if (diagnostic.Id == CS0246)
CSharpRemoveUnnecessaryNullableDirectiveCodeFixProvider.cs (1)
39if (diagnostic.Id == IDEDiagnosticIds.RemoveRedundantNullableDirectiveDiagnosticId)
CSharpUpgradeProjectCodeFixProvider.cs (1)
81else if (diagnostic.Id == "CS8652")
UseExpressionBodyCodeFixProvider.cs (1)
83var helper = _helpers.Single(h => h.DiagnosticId == diagnostic.Id);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
662Assert.Equal(IDEDiagnosticIds.InlineIsTypeCheckId, diag.Id);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (10)
CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
662Assert.Equal(IDEDiagnosticIds.InlineIsTypeCheckId, diag.Id);
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (6)
208var diagnosticsFromAnalyzer = diagnostics.Where(d => d.Id == "SyntaxDiagnostic"); 263var diagnosticsFromAnalyzer = diagnostics.Where(d => d.Id == CodeBlockAnalyzerFactory.Descriptor.Id); 282var diagnosticsFromAnalyzer = diagnostics.Where(d => d.Id == CodeBlockAnalyzerFactory.Descriptor.Id); 342AssertEx.Any(diagnostics, d => d.Id == DocumentAnalysisExecutor.AnalyzerExceptionDiagnosticId); 802.OrderBy(d => d.Id).ToImmutableArray(); 935if (this.mapping.TryGetValue(diagnostic.Id, out var descriptor))
Diagnostics\Suppression\SuppressionTests.cs (2)
469var cs0219Fixes = allFixes.Where(fix => fix.PrimaryDiagnostic.Id == "CS0219").ToArray(); 479var cs0168Fixes = allFixes.Where(fix => fix.PrimaryDiagnostic.Id == "CS0168");
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
770.Select(d => $"{d.Id}: {d.GetMessage().Split(new[] { Environment.NewLine }, StringSplitOptions.None).First()}"));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (14)
Attributes\AttributeTests_WellKnownAttributes.cs (2)
8212Assert.Equal("TEST1", diag.Id); 8378Assert.Equal("TEST1", diag.Id);
Diagnostics\DiagnosticAnalyzerTests.cs (10)
352var diagIds = new HashSet<string>(diags.Select(d => d.Id)); 355Assert.True(diagIds.Remove(effectiveDiag.Id)); 360Assert.Equal(infoDiagDescriptor.Id, effectiveDiag.Id); 364Assert.Equal(noneDiagDescriptor.Id, effectiveDiag.Id); 368Assert.Equal(errorDiagDescriptor.Id, effectiveDiag.Id); 372Assert.Equal(warningDiagDescriptor.Id, effectiveDiag.Id); 3627Assert.Equal(((FieldAnalyzer)analyzer).Descriptor.Id, diagnostic.Id); 3811Assert.Equal(analyzer.Descriptor.Id, diagnostic.Id); 3876d => d.Id == analyzer.Descriptor.Id && PathUtilities.Comparer.Equals(d.Location.GetLineSpan().Path, additionalFile.Path)); 4097Assert.Equal(CancellationTestAnalyzer.DiagnosticId, diagnostic.Id);
Diagnostics\GetDiagnosticsTests.cs (2)
697Assert.Equal(RegisterSyntaxTreeCancellationAnalyzer.DiagnosticId, diagnostic.Id); 781var group1 = semanticDiagnostics.Where(d => d.Id == "ID0001");
Microsoft.CodeAnalysis.CSharp.Features (10)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (2)
182var ruleIdText = string.IsNullOrWhiteSpace(title) ? diagnostic.Id : string.Format("{0}:{1}", diagnostic.Id, title);
ConvertNamespaceCodeFixProvider.cs (2)
45diagnostic.Id switch 49_ => throw ExceptionUtilities.UnexpectedValue(diagnostic.Id),
CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
42if (diagnostic.Id == CS0246)
CSharpRemoveUnnecessaryNullableDirectiveCodeFixProvider.cs (1)
39if (diagnostic.Id == IDEDiagnosticIds.RemoveRedundantNullableDirectiveDiagnosticId)
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
62if (diagnostic.Id == CS0162)
CSharpUpgradeProjectCodeFixProvider.cs (1)
81else if (diagnostic.Id == "CS8652")
UseExpressionBodyCodeFixProvider.cs (1)
83var helper = _helpers.Single(h => h.DiagnosticId == diagnostic.Id);
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
182return diagnostics.Any(static d => d.Id is CS0165 or CS0103);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
221Assert.All(diagnostics, d => Assert.Equal(spans.Single().Key, d.Id));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CSharpUnnecessaryImportsProvider.cs (1)
35if (diagnostic.Id == "CS8019" &&
Simplification\CSharpSimplificationService.cs (1)
194if (diagnostic.Id == s_CS8019_UnusedUsingDirective)
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (12)
Diagnostics\AbstractDiagnosticProviderBasedUserDiagnosticTest.cs (2)
174var dxs = diagnostics.Where(d => ids.Contains(d.Id)).ToList(); 215diagnostics = diagnostics.WhereAsArray(d => d.Id == diagnosticId);
Diagnostics\AbstractSuppressionAllCodeTests.cs (3)
137=> x.Id == y.Id && x.Descriptor.Category == y.Descriptor.Category; 140=> Hash.Combine(obj.Id, obj.Descriptor.Category.GetHashCode());
Diagnostics\AbstractSuppressionDiagnosticTest.cs (1)
94var wrapperCodeFixer = new WrapperCodeFixProvider(fixer, filteredDiagnostics.Select(d => d.Id));
Diagnostics\AbstractUserDiagnosticTest.cs (3)
66Assert.Equal(expected[0].Code, diagnostic.Id); 210var diagnosticIds = ImmutableHashSet.Create(diagnostic.Id); 264actualTextSpans = diagnostics.Where(d => d.Id == diagnosticId).Select(d => d.Location.SourceSpan).ToSet();
Diagnostics\AbstractUserDiagnosticTest.FixAllDiagnosticProvider.cs (2)
34diags = diags.Where(diag => _diagnosticIds.Contains(diag.Id)); 50diags = diags.Where(diag => _diagnosticIds.Contains(diag.Id));
Diagnostics\AbstractUserDiagnosticTest_GenerateTypeDialog.cs (1)
90var generateTypeDiagFixes = diagnostics.SingleOrDefault(df => GenerateTypeTestState.FixIds.Contains(df.Id));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (17)
CodeFixes\CodeFixServiceTests.cs (3)
675var actualDiagnosticIdsWithRegisteredCodeActionsByNuGetFixer = nugetFixerRegisteredActions.SelectMany(a => a.Diagnostics).Select(d => d.Id); 679var actualDiagnosticIdsWithRegisteredCodeActionsByVsixFixer = vsixFixerRegisteredActions.SelectMany(a => a.Diagnostics).Select(d => d.Id); 748var fixableDiagnostics = context.Diagnostics.WhereAsArray(d => FixableDiagnosticIds.Contains(d.Id));
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (14)
1405diagnostics1.Select(d => $"{d.Id}: {d.GetMessage()}")); 1476diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 1490diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 1543diagnostics1.Select(d => $"{d.Id}: {d.GetMessage()}")); 1623diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 1697diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 1741diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 1755diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 2216diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 2225diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 4089diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 4504Assert.Equal("CS0103", result2.Diagnostics.Single().Diagnostics.Single().Id); 4596result.diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}")); 4662result.diagnostics.Select(d => $"{d.Id}: {d.GetMessage()}"));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (6)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
164Dim diagnostics = docAndDiagnostics.Item2.Where(Function(d) ids.Contains(d.Id)).ToList()
Diagnostics\DiagnosticServiceTests.vb (5)
569Assert.Equal(expected.Id, diagnostics.First().Id) 875Assert.Equal(StatefulCompilationAnalyzer.Descriptor.Id, diagnostic.Id) 907Assert.Equal(StatefulCompilationAnalyzer.Descriptor.Id, diagnostic.Id) 942}, projectDiagnostics.Select(Function(d) d.Id & ": " & d.GetMessage())) 948}, documentDiagnostics.Select(Function(d) d.Id & ": " & d.GetMessage()))
Microsoft.CodeAnalysis.Features (31)
AbstractAddExplicitCastCodeFixProvider.cs (2)
71semanticModel, root, diagnostic.Id, spanNode, cancellationToken, 211if (TryGetTargetTypeInfo(document, semanticModel, root, diagnostics[0].Id, spanNode, cancellationToken, out var potentialConversionTypes) &&
AbstractAddParameterCodeFixProvider.cs (2)
100if (TooManyArgumentsDiagnosticIds.Contains(diagnostic.Id)) 105if (CannotConvertDiagnosticIds.Contains(diagnostic.Id))
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
546if (!idToPragmasMap.TryGetValue(diagnostic.Id, out var pragmasForIdInReverseOrder)) 588!idToSuppressMessageAttributesMap.TryGetValue(diagnostic.Id, out var suppressMessageAttributesForId))
AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
235diagnosticId = diagnostics[0].Id; 242Debug.Assert(diagnosticId == diagnostic.Id);
AddImport\AbstractAddImportFeatureService.cs (2)
498document, span, diagnostic.Id, maxResultsPerDiagnostic, 545.Where(diagnostic => diagnosticIds.Contains(diagnostic.Id))
AddPackage\AbstractAddSpecificPackageCodeFixProvider.cs (1)
38var assemblyName = GetAssemblyName(context.Diagnostics[0].Id);
CodeFixes\Configuration\ConfigurationUpdater.cs (4)
402if (IDEDiagnosticIdToOptionMappingHelper.TryGetMappedOptions(diagnostic.Id, project.Language, out var options)) 545foundMatch = string.Equals(diagId, _diagnostic.Id, StringComparison.OrdinalIgnoreCase); 709? $"{DiagnosticOptionPrefix}{_diagnostic.Id}{SeveritySuffix} = {_newSeverity}" 716? $"{_diagnostic.Id}: {_diagnostic.Descriptor.Title}"
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
51return IDEDiagnosticIdToOptionMappingHelper.TryGetMappedOptions(diagnostic.Id, language, out _);
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.TopLevelConfigureCodeStyleOptionCodeAction.cs (1)
15: base(nestedActions, string.Format(FeaturesResources.Configure_0_code_style, diagnostic.Id))
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.TopLevelConfigureSeverityCodeAction.cs (1)
17: base(nestedActions, string.Format(FeaturesResources.Configure_0_severity, diagnostic.Id))
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (2)
82if (diagnostic.Id == IDEDiagnosticIds.FormattingDiagnosticId) 89return diagnostic.Id;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs (1)
51protected override string DiagnosticIdForEquivalenceKey => _diagnostic.Id;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
234if (uniqueIds.Add(diagnostic.Id))
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.LocalSuppressMessageCodeAction.cs (1)
49protected override string DiagnosticIdForEquivalenceKey => _diagnostic.Id;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
73id: diagnostic.Id,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningCodeAction.cs (1)
57=> _forFixMultipleContext ? string.Empty : _diagnostic.Id;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.cs (2)
54: base(fixer, title: string.Format(FeaturesResources.Remove_Suppression_0, diagnostic.Id)) 65=> _forFixMultipleContext ? string.Empty : _diagnostic.Id;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
135if (fixer.IsAnyPragmaDirectiveForId(trivia, diagnostic.Id, out var isEnableDirective, out var hasMultipleIds))
CodeFixes\Suppression\SuppressionHelpers.cs (1)
34return diagnostic.Id != IDEDiagnosticIds.FormattingDiagnosticId;
CodeFixes\Suppression\TopLevelSuppressionCodeAction.cs (1)
15: base(ImmutableArray<CodeAction>.CastUp(nestedActions), string.Format(FeaturesResources.Suppress_0, diagnostic.Id))
EditAndContinue\EditSessionTelemetry.cs (1)
130=> LogProjectAnalysisSummary(summary, projectTelemetryId, emitDiagnostics.SelectAsArray(d => d.Severity == DiagnosticSeverity.Error, d => d.Id));
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Features\CodeFixes\CodeFixService.cs (3)
486hasFix: d => this.GetFixableDiagnosticIds(fixer, extensionManager).Contains(d.Id), 727.Select(d => d.Id) 734var codeFixProvider = (fixer as CodeFixProvider) ?? new WrapperCodeFixProvider((IConfigurationFixProvider)fixer, diagnostics.Select(d => d.Id));
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
349switch (d.Id)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (5)
309await VerifyDiagnosticLocationAsync(diagnostic.Id, diagnostic.Location).ConfigureAwait(false); 315await VerifyDiagnosticLocationAsync(diagnostic.Id, location).ConfigureAwait(false); 442return x.Id == y.Id && x.Location == y.Location; 450return Hash.Combine(obj.Id.GetHashCode(), obj.Location.GetHashCode());
Handler\CodeActions\CodeActionHelpers.cs (1)
153var diagnosticCodesFixedByAction = codeFixAction.CodeFix.Diagnostics.Select(d => d.Id);
Microsoft.CodeAnalysis.Test.Utilities (7)
Diagnostics\CommonDiagnosticAnalyzers.cs (4)
438var descriptor = diagnostic.Id == Descriptor1.SuppressedDiagnosticId ? Descriptor1 : Descriptor2; 2065Assert.Equal(SuppressionDescriptor.SuppressedDiagnosticId, diagnostic.Id); 2162Assert.Equal(_unsupportedDescriptor.SuppressedDiagnosticId, diagnostic.Id); 2194Assert.Equal(_supportedDescriptor.SuppressedDiagnosticId, diagnostic.Id);
Diagnostics\DiagnosticDescription.cs (1)
135_code = d.Id;
Diagnostics\DiagnosticExtensions.cs (1)
445=> e.Location.IsInSource ? $"{e.Severity} {e.Id}: {e.GetMessage(CultureInfo.CurrentCulture)}" :
Diagnostics\DiagnosticsHelper.cs (1)
27var actualDiagnosticIds = actualDiagnostics.Select(d => d.Id);
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicDiagnosticFilter.vb (1)
84diagnostic.Id,
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
VisualBasicUnnecessaryImportsProvider.vb (3)
37If diagnostic.Id = BC50000 Then 44If diagnostic.Id = BC50001 Then 81Return diagnostics.Any(Function(d) d.Id = BC30561)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (7)
EndConstructGeneration\VisualBasicEndConstructGenerationService.vb (7)
268If errors.Any(Function(e) Not IsMissingStatementError(statement, e.Id)) Then 365If Not IsExpectedXmlEndCDataError(errors(0).Id) Then 393If Not IsExpectedXmlEndCommentError(errors(0).Id) Then 421If Not IsMissingXmlEndTagError(errors(0).Id) Then 445If Not errors.Any(Function(e) IsExpectedXmlEndEmbeddedError(e.Id)) Then 473If Not (errors.Any(Function(e) IsExpectedXmlNameError(e.Id)) AndAlso 474errors.Any(Function(e) IsExpectedXmlEndPIError(e.Id))) Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (3)
SimplifyThisOrMe\SimplifyThisOrMeTests.vb (1)
37Dim diagnostics = (Await GetDiagnosticsAsync(workspace, parameters3)).Where(Function(d) d.Id = IDEDiagnosticIds.RemoveThisOrMeQualificationDiagnosticId)
SimplifyTypeNames\SimplifyTypeNamesTests.vb (2)
2336Dim diagnostics = (Await GetDiagnosticsAsync(workspace, parameters)).Where(Function(d) d.Id = IDEDiagnosticIds.SimplifyMemberAccessDiagnosticId) 2353Dim diagnostics = (Await GetDiagnosticsAsync(workspace, parameters2)).Where(Function(d) d.Id = IDEDiagnosticIds.PreferBuiltInOrFrameworkTypeDiagnosticId)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Attributes\AttributeTests_ObsoleteAttribute.vb (1)
1361Assert.Equal("TEST1", diag.Id)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
220If diagnostics.SingleOrDefault(Function(d) d.Id = "BC30619") IsNot Nothing Then
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (2)
183Dim ruleIdText = If(String.IsNullOrWhiteSpace(title), diagnostic.Id, String.Format("{0}:{1}", diagnostic.Id, title))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (8)
Diagnostics\DiagnosticAnalyzerTests.vb (7)
99Dim diagIds = New HashSet(Of String)(diags.[Select](Function(d) d.Id)) 101Assert.[True](diagIds.Remove(effectiveDiag.Id)) 105Assert.Equal(infoDiagDescriptor.Id, effectiveDiag.Id) 108Assert.Equal(noneDiagDescriptor.Id, effectiveDiag.Id) 112Assert.Equal(errorDiagDescriptor.Id, effectiveDiag.Id) 116Assert.Equal(warningDiagDescriptor.Id, effectiveDiag.Id) 1678Assert.Equal(Analyzer.Descriptor.Id, diagnostic.Id)
Diagnostics\GetDiagnosticsTests.vb (1)
528Dim group1 = semanticDiagnostics.Where(Function(d) d.Id = "ID0001")
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
992Dim message = e.Id + ": " + e.GetMessage(EnsureEnglishUICulture.PreferredOrNull)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
CodeCleanup\Providers\ReduceTokensCodeCleanupProvider.vb (1)
331Return diagnostics.Any(Function(diagnostic As Diagnostic) diagnostic.Id = "BC30036")
Simplification\VisualBasicSimplificationService.vb (2)
169If diagnostic.Id = s_BC50000_UnusedImportsClause OrElse diagnostic.Id = s_BC50001_UnusedImportsStatement Then
VisualBasicUnnecessaryImportsProvider.vb (3)
37If diagnostic.Id = BC50000 Then 44If diagnostic.Id = BC50001 Then 81Return diagnostics.Any(Function(d) d.Id = BC30561)
Microsoft.CodeAnalysis.Workspaces (13)
CodeFixes\CodeFixContext.cs (4)
102/// Additionally, the <see cref="Diagnostic.Id"/> of each diagnostic must be in the set of the <see cref="CodeFixProvider.FixableDiagnosticIds"/> of the associated <see cref="CodeFixProvider"/>. 136/// Additionally, the <see cref="Diagnostic.Id"/> of each diagnostic must be in the set of the <see cref="CodeFixProvider.FixableDiagnosticIds"/> of the associated <see cref="CodeFixProvider"/>. 167/// The <see cref="Diagnostic.Id"/> of this diagnostic must be in the set of the <see cref="CodeFixProvider.FixableDiagnosticIds"/> of the associated <see cref="CodeFixProvider"/>. 194/// The <see cref="Diagnostic.Id"/> of this diagnostic must be in the set of the <see cref="CodeFixProvider.FixableDiagnosticIds"/> of the associated <see cref="CodeFixProvider"/>.
CodeFixes\CodeFixProvider.cs (1)
28/// The context must only contain diagnostics with a <see cref="Diagnostic.Id"/> included in the <see cref="FixableDiagnosticIds"/> for the current provider.
CodeFixes\FixAllOccurrences\FixAllContext.cs (1)
252return diagnostics.Where(d => d != null && diagnosticIds.Contains(d.Id)
CodeFixes\FixAllOccurrences\FixAllState.cs (1)
119uniqueIds.Add(diagnostic.Id);
CodeFixesAndRefactorings\FixAllProviderInfo.cs (1)
129=> _supportedDiagnosticIds.Contains(diagnostic.Id);
Diagnostics\DiagnosticData.cs (1)
254diagnostic.Id,
Diagnostics\Extensions.cs (1)
303diagnosticIdsToFilter.Contains(diagnostic.Id) ||
DocumentExtensions.cs (1)
166diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Shared\Extensions\TelemetryExtensions.cs (1)
58return diagnostic.Id;
Workspace\Solution\SolutionState.SkeletonReferenceCache.cs (1)
277var groups = emitResult.Diagnostics.GroupBy(d => d.Id).Select(g => $"{g.Key}:{g.Count()}");
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
4097Assert.Equal("CS8602", diagnostic.Id); 4118Assert.Contains("CS8669", diagnostic.Id);
Microsoft.VisualStudio.LanguageServices (1)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
509return codeFixService.GetSuppressionFixer(language, diagnostics.Select(d => d.Id));
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.CodeModelEventCollector.vb (1)
123Return errors.All(Function(e) IsMissingEndBlockError(e.Id))