516 references to Create
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
32context.ReportDiagnostic(Diagnostic.Create(Diagnostics.s_modelNameMustBeValid, token.GetLocation(), validationMessage));
ConfigurationSchemaGenerator (1)
RuntimeSource\SourceGenerators\DiagnosticInfo.cs (1)
38=> Diagnostic.Create(Descriptor, Location, MessageArgs);
CSharpSyntaxGenerator (3)
SourceGenerator.cs (3)
60context.ReportDiagnostic(Diagnostic.Create(s_MissingSyntaxXml, location: null)); 67context.ReportDiagnostic(Diagnostic.Create(s_UnableToReadSyntaxXml, location: null)); 90Diagnostic.Create(
ILLink.RoslynAnalyzer (13)
COMAnalyzer.cs (1)
54 operationContext.ReportDiagnostic (Diagnostic.Create (s_correctnessOfCOMCannotBeGuaranteed,
DynamicallyAccessedMembersAnalyzer.cs (7)
154 context.ReportDiagnostic (Diagnostic.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnFieldCanOnlyApplyToTypesOrStrings), location, member.GetDisplayName ())); 157 context.ReportDiagnostic (Diagnostic.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings), location, member.GetDisplayName ())); 159 context.ReportDiagnostic (Diagnostic.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods), location)); 162 context.ReportDiagnostic (Diagnostic.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnMethodParameterCanOnlyApplyToTypesOrStrings), location, parameter.GetDisplayName (), member.GetDisplayName ())); 165 context.ReportDiagnostic (Diagnostic.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnPropertyCanOnlyApplyToTypesOrStrings), location, member.GetDisplayName ())); 254 context.ReportDiagnostic (Diagnostic.Create ( 293 context.ReportDiagnostic (Diagnostic.Create (
RequiresAnalyzerBase.cs (3)
100 syntaxNodeAnalysisContext.ReportDiagnostic (Diagnostic.Create (RequiresDiagnosticRule, 235 symbolAnalysisContext.ReportDiagnostic (Diagnostic.Create ( 245 symbolAnalysisContext.ReportDiagnostic (Diagnostic.Create (
RequiresUnreferencedCodeAnalyzer.cs (1)
35 var diag = Diagnostic.Create (s_typeDerivesFromRucClassRule,
TrimAnalysis\DiagnosticContext.cs (1)
27 return Diagnostic.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (id), Location, args);
Microsoft.Analyzers.Extra (16)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
123Diagnostic.Create(DiagDescriptors.AsyncCallInsideUsingBlock, invocation.Syntax.GetLocation());
AsyncMethodWithoutCancellation.cs (1)
110Diagnostic.Create(DiagDescriptors.AsyncMethodWithoutCancellation, analysisContext.Node.GetLocation());
CallAnalysis\Arrays.cs (1)
128var diagnostic = Diagnostic.Create(DiagDescriptors.Arrays, loc, valueType.ToDisplayString(), type.ToDisplayString());
CallAnalysis\LegacyCollection.cs (1)
33var diagnostic = Diagnostic.Create(DiagDescriptors.LegacyCollection, op.Syntax.GetLocation());
CallAnalysis\LegacyLogging.cs (1)
38var diagnostic = Diagnostic.Create(DiagDescriptors.LegacyLogging, op.Syntax.GetLocation());
CallAnalysis\Split.cs (1)
28var diagnostic = Diagnostic.Create(DiagDescriptors.Split, op.Syntax.GetLocation());
CallAnalysis\StartsEndsWith.cs (1)
59var diagnostic = Diagnostic.Create(DiagDescriptors.StartsEndsWith, op.Syntax.GetLocation(), op.TargetMethod.Name);
CallAnalysis\StaticTime.cs (2)
52var diagnostic = Diagnostic.Create(DiagDescriptors.StaticTime, op.Syntax.GetLocation()); 58var diagnostic = Diagnostic.Create(DiagDescriptors.StaticTime, op.Syntax.GetLocation());
CallAnalysis\ValueTuple.cs (2)
42var diagnostic = Diagnostic.Create(DiagDescriptors.ValueTuple, op.Syntax.GetLocation()); 48var diagnostic = Diagnostic.Create(DiagDescriptors.ValueTuple, op.Syntax.GetLocation());
CoalesceAnalyzer.cs (2)
52var diagnostic = Diagnostic.Create(DiagDescriptors.CoalesceAssignment, op.Syntax.GetLocation()); 79var diagnostic = Diagnostic.Create(DiagDescriptors.Coalesce, op.Syntax.GetLocation());
ConditionalAccessAnalyzer.cs (1)
111var diagnostic = Diagnostic.Create(DiagDescriptors.ConditionalAccess, op.Syntax.GetLocation());
MakeExeTypesInternalAnalyzer.cs (1)
134var diagnostic = Diagnostic.Create(DiagDescriptors.MakeExeTypesInternal, type.Locations[0], type.Name);
UsingToStringInLoggersAnalyzer.cs (1)
69yield return Diagnostic.Create(DiagDescriptors.UsingToStringInLoggers, arg.Syntax.GetLocation());
Microsoft.Analyzers.Local (15)
ApiLifecycle\ApiLifecycleAnalyzer.cs (11)
76context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.NewSymbolsMustBeMarkedExperimental, symbol.Locations.FirstOrDefault(), symbol)); 84context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, type.ModifiersAndName)); 89context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, method.Member)); 94context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, prop.Member)); 99context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, field.Member)); 113context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.ExperimentalSymbolsCantBeMarkedObsolete, symbol.Locations.FirstOrDefault(), symbol)); 120context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeMarkedExperimental, symbol.Locations.FirstOrDefault(), symbol)); 127context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantChange, symbol.Locations.FirstOrDefault(), symbol)); 135context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantChange, symbol.Locations.FirstOrDefault(), symbol)); 156context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.NewSymbolsMustBeMarkedExperimental, type.Locations.FirstOrDefault(), type)); 160context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.ExperimentalSymbolsCantBeMarkedObsolete, type.Locations.FirstOrDefault(), type));
CallAnalysis\Throws.cs (2)
37var diagnostic = Diagnostic.Create( 51var diagnostic = Diagnostic.Create(
CallAnalysis\ToInvariantString.cs (1)
51var diagnostic = Diagnostic.Create(DiagDescriptors.ToInvariantString, op.Syntax.GetLocation());
InternalReferencedInPublicDocAnalyzer.cs (1)
154var diagnostic = Diagnostic.Create(DiagDescriptors.InternalReferencedInPublicDoc, crefNode.Cref.GetLocation(), referencedName);
Microsoft.AspNetCore.Analyzers (4)
BuildServiceProviderAnalyzer.cs (1)
31context.ReportDiagnostic(Diagnostic.Create(
UseAuthorizationAnalyzer.cs (2)
49context.ReportDiagnostic(Diagnostic.Create( 69context.ReportDiagnostic(Diagnostic.Create(
UseMvcAnalyzer.cs (1)
43context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.App.Analyzers (19)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
230context.ReportDiagnostic(Diagnostic.Create(
Http\HeaderDictionaryAddAnalyzer.cs (1)
74context.ReportDiagnostic(Diagnostic.Create(
Http\RequestDelegateReturnTypeAnalyzer.cs (1)
78context.ReportDiagnostic(Diagnostic.Create(
Kestrel\ListenOnIPv6AnyAnalyzer.cs (2)
69context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.KestrelShouldListenOnIPv6AnyInsteadOfIpAny, ipAddressArgumentSyntax.GetLocation())); 94context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.KestrelShouldListenOnIPv6AnyInsteadOfIpAny, ipAddressArgumentSyntax.GetLocation()));
Mvc\DetectAmbiguousActionRoutes.cs (1)
42context.ReportDiagnostic(Diagnostic.Create(
Mvc\DetectOverriddenAuthorizeAttribute.cs (1)
216context.ReportDiagnostic(Diagnostic.Create(
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
45context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
54context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\DetectAmbiguousRoutes.cs (1)
40context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\DetectMismatchedParameterOptionality.cs (1)
36context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\DetectMisplacedLambdaAttribute.cs (1)
47context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
38context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (2)
74context.ReportDiagnostic(Diagnostic.Create( 103context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\DisallowReturningActionResultFromMapMethods.cs (2)
47context.ReportDiagnostic(Diagnostic.Create( 81context.ReportDiagnostic(Diagnostic.Create(
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
27context.ReportDiagnostic(Diagnostic.Create(
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
304return Diagnostic.Create(descriptor, location, methodName);
Microsoft.AspNetCore.App.Analyzers.Test (1)
Infrastructure\WellKnownTypesTests.cs (1)
121context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Components.Analyzers (10)
ComponentParameterAnalyzer.cs (5)
84context.ReportDiagnostic(Diagnostic.Create( 91context.ReportDiagnostic(Diagnostic.Create( 105context.ReportDiagnostic(Diagnostic.Create( 115context.ReportDiagnostic(Diagnostic.Create( 126context.ReportDiagnostic(Diagnostic.Create(
ComponentParameterUsageAnalyzer.cs (1)
105context.ReportDiagnostic(Diagnostic.Create(
InternalUsageAnalyzer.cs (4)
137context.ReportDiagnostic(Diagnostic.Create( 147context.ReportDiagnostic(Diagnostic.Create( 166context.ReportDiagnostic(Diagnostic.Create( 176context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Components.SdkAnalyzers (9)
ComponentParameterAnalyzer.cs (4)
78context.ReportDiagnostic(Diagnostic.Create( 85context.ReportDiagnostic(Diagnostic.Create( 99context.ReportDiagnostic(Diagnostic.Create( 113context.ReportDiagnostic(Diagnostic.Create(
ComponentParameterUsageAnalyzer.cs (1)
105context.ReportDiagnostic(Diagnostic.Create(
InternalUsageAnalyzer.cs (4)
137context.ReportDiagnostic(Diagnostic.Create( 147context.ReportDiagnostic(Diagnostic.Create( 166context.ReportDiagnostic(Diagnostic.Create( 176context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Http.RequestDelegateGenerator (15)
StaticRouteHandlerModel\Emitters\DiagnosticEmitter.cs (5)
16diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.TypeParametersNotSupported, location)); 21diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InaccessibleTypesNotSupported, location)); 26diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.UnableToResolveAnonymousReturnType, location)); 37diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.TypeParametersNotSupported, location)); 45diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InaccessibleTypesNotSupported, location, typeSymbol.Name));
StaticRouteHandlerModel\Endpoint.cs (2)
31Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.UnableToResolveMethod, Operation.Syntax.GetLocation())); 77Diagnostics.Add(Diagnostic.Create(
StaticRouteHandlerModel\EndpointParameter.cs (8)
116endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.UnableToResolveParameterDescriptor, location, symbol.Name)); 152endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.KeyedAndNotKeyedServiceAttributesNotSupported, location)); 167endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersNullable, location, Type.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat))); 175endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersNested, location)); 465endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersAbstractType, location, parameterTypeString)); 504endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersSignature, location, parameterTypeString)); 523endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersSingleConstructorOnly, location, parameterTypeString)); 527endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.InvalidAsParametersNoConstructorFound, location, parameterTypeString));
Microsoft.AspNetCore.Mvc.Analyzers (7)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (3)
89context.ReportDiagnostic(Diagnostic.Create( 103context.ReportDiagnostic(Diagnostic.Create( 117context.ReportDiagnostic(Diagnostic.Create(
AvoidHtmlPartialAnalyzer.cs (2)
31context.ReportDiagnostic(Diagnostic.Create( 38context.ReportDiagnostic(Diagnostic.Create(
TagHelpersInCodeBlocksAnalyzer.cs (1)
97Diagnostic.Create(DiagnosticDescriptors.MVC1006_FunctionsContainingTagHelpersMustBeAsyncAndReturnTask, location));
TopLevelParameterNameAnalyzer.cs (1)
74Diagnostic.Create(
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
ApiConventionAnalyzer.cs (3)
60context.ReportDiagnostic(Diagnostic.Create( 66context.ReportDiagnostic(Diagnostic.Create( 86context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
CompilerFailedExceptionFactoryTest.cs (3)
238Diagnostic.Create( 244Diagnostic.Create( 250Diagnostic.Create(
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (20)
HubClientProxyGenerator.Parser.cs (10)
55context.ReportDiagnostic(Diagnostic.Create( 64context.ReportDiagnostic(Diagnostic.Create( 73context.ReportDiagnostic(Diagnostic.Create( 82context.ReportDiagnostic(Diagnostic.Create( 91context.ReportDiagnostic(Diagnostic.Create( 100context.ReportDiagnostic(Diagnostic.Create( 109context.ReportDiagnostic(Diagnostic.Create( 197Diagnostic.Create( 228_context.ReportDiagnostic(Diagnostic.Create( 303_context.ReportDiagnostic(Diagnostic.Create(
HubServerProxyGenerator.Parser.cs (10)
55context.ReportDiagnostic(Diagnostic.Create( 64context.ReportDiagnostic(Diagnostic.Create( 73context.ReportDiagnostic(Diagnostic.Create( 82context.ReportDiagnostic(Diagnostic.Create( 91context.ReportDiagnostic(Diagnostic.Create( 99context.ReportDiagnostic(Diagnostic.Create( 187Diagnostic.Create(DiagnosticDescriptors.TooManyHubServerProxyAttributedMethods, 217_context.ReportDiagnostic(Diagnostic.Create( 240_context.ReportDiagnostic(Diagnostic.Create( 325_context.ReportDiagnostic(Diagnostic.Create(
Microsoft.CodeAnalysis (7)
CommandLine\AnalyzerConfigSet.cs (3)
432diagnosticBuilder.Add(Diagnostic.Create( 503diagnostics.Add(Diagnostic.Create( 526diagnostics.Add(Diagnostic.Create(
Diagnostic\DiagnosticDescriptor.cs (1)
244var effectiveDiagnostic = compilationOptions.FilterDiagnostic(Diagnostic.Create(this, Location.None), CancellationToken.None);
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
1252return Diagnostic.Create(descriptor, Location.None, messageArguments); 1299return Diagnostic.Create(descriptor, Location.None, messageArguments);
SourceGeneration\GeneratorDriver.cs (1)
416return Diagnostic.Create(descriptor, Location.None, generator.GetGeneratorType().Name, e.GetType().Name, e.Message, e.CreateDiagnosticDescription());
Microsoft.CodeAnalysis.CodeStyle (10)
src\Analyzers\Core\Analyzers\ConvertTypeofToNameof\AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
50context.ReportDiagnostic(Diagnostic.Create(Descriptor, location));
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (2)
71context.ReportDiagnostic(Diagnostic.Create(s_missingHeaderDescriptor, fileHeader.GetLocation(tree))); 78context.ReportDiagnostic(Diagnostic.Create(s_invalidHeaderDescriptor, fileHeader.GetLocation(tree)));
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (3)
137context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None)); 204yield return Diagnostic.Create(descriptor, tree.GetLocation(span)); 217yield return Diagnostic.Create(s_fixableIdDescriptor, tree.GetLocation(span));
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
83reportDiagnostic(Diagnostic.Create(s_invalidScopeDescriptor, attributeSyntax.GetLocation())); 90reportDiagnostic(Diagnostic.Create(s_invalidOrMissingTargetDescriptor, attributeSyntax.GetLocation()));
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
152context.ReportDiagnostic(Diagnostic.Create(Descriptor, nextInvocation.Syntax.GetLocation()));
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
357var diagnostic = Diagnostic.Create(
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
113var diagnostic = Diagnostic.Create(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
15789context.ReportDiagnostic(Diagnostic.Create(Hidden01, context.Node.GetLocation())); 15815context.ReportDiagnostic(Diagnostic.Create(Info01, context.Node.GetLocation())); 15843symbolContext.ReportDiagnostic(Diagnostic.Create(Warning01, symbolContext.Symbol.Locations.First())); 15860symbolContext.ReportDiagnostic(Diagnostic.Create(Warning02, symbolContext.Symbol.Locations.First()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (4)
236=> context.ReportDiagnostic(Diagnostic.Create(s_syntaxDiagnosticDescriptor, context.Tree.GetRoot().GetFirstToken().GetLocation())); 326context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation())); 355=> context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.Create(context.Tree, TextSpan.FromBounds(1000, 2000)))); 886var diagnostic = Diagnostic.Create(descriptor, context.Symbol.Locations[0]);
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
54var diagnostic = Diagnostic.Create(Descriptor, node.GetLocation());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (34)
Diagnostics\DiagnosticAnalyzerTests.cs (30)
58context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_CA9999_UseOfVariableThatStartsWithX, id.Location, id.Identifier.ValueText)); 254var diag1 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Node.GetLocation(), "Attribute"); 259var diag2 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Node.GetLocation(), "ClassDeclaration"); 264var diag3 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Node.GetLocation(), "UsingDirective"); 272var diag1 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Symbol.Locations[0], "NamedType"); 308var noneDiag = CodeAnalysis.Diagnostic.Create(noneDiagDescriptor, Location.None); 309var infoDiag = CodeAnalysis.Diagnostic.Create(infoDiagDescriptor, Location.None); 310var warningDiag = CodeAnalysis.Diagnostic.Create(warningDiagDescriptor, Location.None); 311var errorDiag = CodeAnalysis.Diagnostic.Create(errorDiagDescriptor, Location.None); 392var noneDiag = Microsoft.CodeAnalysis.Diagnostic.Create(noneDiagDescriptor, Location.None); 393var infoDiag = Microsoft.CodeAnalysis.Diagnostic.Create(infoDiagDescriptor, Location.None); 394var warningDiag = Microsoft.CodeAnalysis.Diagnostic.Create(warningDiagDescriptor, Location.None); 395var errorDiag = Microsoft.CodeAnalysis.Diagnostic.Create(errorDiagDescriptor, Location.None); 445var disabledDiag = CodeAnalysis.Diagnostic.Create(disabledDiagDescriptor, Location.None); 446var enabledDiag = CodeAnalysis.Diagnostic.Create(enabledDiagDescriptor, Location.None); 668var diagnostic = CodeAnalysis.Diagnostic.Create(Rule, fieldDeclaration.GetLocation()); 784context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor1, Location.None)); 799registerSyntaxNodeAction(context => { context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor2, Location.None)); }, 802registerSyntaxNodeAction(context => { context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor3, Location.None)); }, 821context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(descriptor, Location.None)); 841ctxt.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor1, method.Locations[0], method.ToDisplayString())); 895compilationContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(UnsupportedDescriptor, Location.None)); 1655nodeContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(ExpressionDescriptor, nodeContext.Node.GetLocation())); 2354var diagnostic = CodeAnalysis.Diagnostic.Create(Warning, location, messageArguments); 3850context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation())), 3856context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation())), 3863context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Operation.Syntax.GetLocation())), 3869context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Operation.Syntax.GetLocation())), 4087var diagnostic = CodeAnalysis.Diagnostic.Create(Rule, recordDeclaration.GetLocation()); 4135var diagnostic = CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation(), context.Node.Kind(), context.ContainingSymbol.Name);
Diagnostics\GetDiagnosticsTests.cs (4)
971blockEndContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(DescriptorForBlockEnd, blockEndContext.CodeBlock.GetLocation())); 990blockEndContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(DescriptorForBlockEnd, operationBlock.Syntax.GetLocation())); 1040reportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor, location, containingSymbol.Name)); 1725var diag = CodeAnalysis.Diagnostic.Create(Descriptor, field.DeclaringSyntaxReferences[0].GetLocation());
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
113var diagnostic = Diagnostic.Create(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (22)
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
38c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
38c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
38c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
50context.ReportDiagnostic(Diagnostic.Create(Decsciptor, location));
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1308var diagnostic = Diagnostic.Create(Descriptor, context.Symbol.ContainingNamespace.Locations[0]);
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (2)
52context.ReportDiagnostic(Diagnostic.Create(Decsciptor1, location)); 53context.ReportDiagnostic(Diagnostic.Create(Decsciptor2, location));
Diagnostics\Suppression\SuppressionTests.cs (15)
709context.ReportDiagnostic(Diagnostic.Create(Decsciptor, classDecl.Identifier.GetLocation())); 819context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 882context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 932context.ReportDiagnostic(Diagnostic.Create(Decsciptor, classDecl.GetLocation())); 1076context.ReportDiagnostic(Diagnostic.Create(Descriptor, classDecl.Identifier.GetLocation())); 1081context.ReportDiagnostic(Diagnostic.Create(Descriptor, ns.Name.GetLocation())); 1086context.ReportDiagnostic(Diagnostic.Create(Descriptor, method.Identifier.GetLocation())); 1091context.ReportDiagnostic(Diagnostic.Create(Descriptor, property.Identifier.GetLocation())); 1096context.ReportDiagnostic(Diagnostic.Create(Descriptor, field.Declaration.Variables.First().Identifier.GetLocation())); 1101context.ReportDiagnostic(Diagnostic.Create(Descriptor, e.Identifier.GetLocation())); 1108context.ReportDiagnostic(Diagnostic.Create(Descriptor, trivia.GetLocation())); 2070context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 2075context.ReportDiagnostic(Diagnostic.Create(_descriptor, ns.Name.GetLocation())); 2080context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())); 2461=> context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
SourceGeneration\GeneratorDriverTests.cs (7)
434var diagnostic = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic, Location.None); 666var diagnostic1 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic1, Location.None); 667var diagnostic2 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic2, Location.None); 668var diagnostic3 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic3, Location.None); 713var diagnostic1 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic1, Location.None); 714var diagnostic2 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic2, Location.None); 715var diagnostic3 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic3, Location.None);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
1179context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_descriptor2, declarator.GetLocation(), declaredSymbol.Name, declaredSymbol.NullableAnnotation));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (1)
30Diagnostic.Create(Descriptor, Location.Create(document.FilePath, default, default))));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
CodeFixes\CodeFixServiceTests.cs (6)
563c.ReportDiagnostic(Diagnostic.Create(descriptor, c.Tree.GetLocation(TextSpan.FromBounds(0, 0)))); 615context.ReportDiagnostic(Diagnostic.Create(s_descriptor, tree.GetLocation(new TextSpan(0, 1)))); 928context.ReportDiagnostic(Diagnostic.Create(_descriptor, location)); 1194context.ReportDiagnostic(Diagnostic.Create(Descriptor, decl.GetLocation())); 1204context.ReportDiagnostic(Diagnostic.Create(Descriptor, decl.GetLocation())); 1210context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Operation.Syntax.GetLocation())),
Diagnostics\DiagnosticAnalyzerServiceTests.cs (9)
923context.RegisterSyntaxTreeAction(c => c.ReportDiagnostic(Diagnostic.Create(s_syntaxRule, c.Tree.GetRoot().GetLocation()))); 924context.RegisterSemanticModelAction(c => c.ReportDiagnostic(Diagnostic.Create(s_semanticRule, c.SemanticModel.SyntaxTree.GetRoot().GetLocation()))); 925context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().GetLocation()))); 939context.RegisterSyntaxTreeAction(c => c.ReportDiagnostic(Diagnostic.Create(s_syntaxRule, c.Tree.GetRoot().GetLocation()))); 940context.RegisterSemanticModelAction(c => c.ReportDiagnostic(Diagnostic.Create(s_semanticRule, c.SemanticModel.SyntaxTree.GetRoot().GetLocation()))); 941context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().GetLocation()))); 952=> Task.FromResult(ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, Location.Create(document.FilePath, TextSpan.FromBounds(0, 0), new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 0)))))); 1016return ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, root.GetLocation())); 1047c.ReportDiagnostic(Diagnostic.Create(_supportedDiagnostics[0], c.Symbol.Locations[0]));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (6)
Diagnostics\DiagnosticServiceTests.vb (6)
1576context.ReportDiagnostic(Diagnostic.Create(DiagDescriptor, location)) 1702context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.CodeBlock.GetLocation)) 1724context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.CodeBlock.GetLocation)) 1750context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None)) 1861context.ReportDiagnostic(Diagnostic.Create(descriptor, context.Node.GetLocation)) 1887ctxt.ReportDiagnostic(Diagnostic.Create(Descriptor, method.Locations(0), method.ToDisplayString))
Microsoft.CodeAnalysis.Features (16)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
212var dummyDiagnosticWithLocationToCheck = Diagnostic.Create(_diagnostic.Descriptor, locationToCheck);
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
81context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptor, typeName.GetLocation(), typeName.ToString()));
EditAndContinue\EditSession.cs (2)
140return Diagnostic.Create(descriptor, Location.None); 173diagnostics.Add(Diagnostic.Create(descriptor, location, messageArgs));
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (1)
105var diagnostic = Diagnostic.Create(
EditAndContinue\RudeEditDiagnostic.cs (1)
44return Diagnostic.Create(descriptor, tree.GetLocation(Span), Arguments);
src\Analyzers\Core\Analyzers\ConvertTypeofToNameof\AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
50context.ReportDiagnostic(Diagnostic.Create(Descriptor, location));
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (2)
71context.ReportDiagnostic(Diagnostic.Create(s_missingHeaderDescriptor, fileHeader.GetLocation(tree))); 78context.ReportDiagnostic(Diagnostic.Create(s_invalidHeaderDescriptor, fileHeader.GetLocation(tree)));
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (3)
137context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None)); 204yield return Diagnostic.Create(descriptor, tree.GetLocation(span)); 217yield return Diagnostic.Create(s_fixableIdDescriptor, tree.GetLocation(span));
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
83reportDiagnostic(Diagnostic.Create(s_invalidScopeDescriptor, attributeSyntax.GetLocation())); 90reportDiagnostic(Diagnostic.Create(s_invalidOrMissingTargetDescriptor, attributeSyntax.GetLocation()));
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
152context.ReportDiagnostic(Diagnostic.Create(Descriptor, nextInvocation.Syntax.GetLocation()));
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
357var diagnostic = Diagnostic.Create(
Microsoft.CodeAnalysis.Features.UnitTests (6)
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
54RudeEdits = [.. rudeEdits.Select(id => new ProjectDiagnostics(id, [Diagnostic.Create(EditAndContinueDiagnosticDescriptors.GetDescriptor(RudeEditKind.InternalError), location: null)]))],
EditAndContinue\RemoteEditAndContinueServiceTests.cs (4)
121var diagnostic = Diagnostic.Create(diagnosticDescriptor, Location.Create(syntaxTree, TextSpan.FromBounds(1, 1))); 199var documentDiagnostic = Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), new[] { "doc", "some error" }); 200var projectDiagnostic = Diagnostic.Create(diagnosticDescriptor1, Location.None, new[] { "proj", "some error" }); 201var syntaxError = Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), new[] { "doc", "syntax error" });
EditAndContinue\TraceLogTests.cs (1)
20var diagnostic = Diagnostic.Create(EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile), Location.None, "file", "error");
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
72return Diagnostic.Create(descriptor, Location.None, analyzerName, e.GetType(), e.Message);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
385Diagnostic.Create(Descriptor, Location.Create(document.FilePath!, default, default))));
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
138=> context.ReportDiagnostic(Diagnostic.Create(_descriptor,
Diagnostics\NonLocalDiagnosticTests.cs (2)
94var diagnostic = Diagnostic.Create(NonLocalDescriptor, root.GetFirstToken().GetLocation()); 105var diagnostic = Diagnostic.Create(CompilationEndDescriptor, root.GetFirstToken().GetLocation());
Diagnostics\PullDiagnosticTests.cs (2)
137context.ReportDiagnostic(Diagnostic.Create(_descriptor, context.Tree.GetRoot(context.CancellationToken).GetLocation()))); 151context.ReportDiagnostic(Diagnostic.Create(_descriptor, context.Node.GetLocation())),
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
87=> context.ReportDiagnostic(Diagnostic.Create(_descriptor, location: null, "args"));
Microsoft.CodeAnalysis.Remote.Workspaces (1)
EditAndContinue\ManagedHotReloadLanguageService.cs (1)
302var diagnostic = Diagnostic.Create(
Microsoft.CodeAnalysis.Test.Utilities (133)
Diagnostics\BoxingOperationAnalyzer.cs (1)
79context.ReportDiagnostic(Diagnostic.Create(BoxingDescriptor, boxingExpression.GetLocation()));
Diagnostics\CommonDiagnosticAnalyzers.cs (53)
564compilationContext.ReportDiagnostic(Diagnostic.Create(EnabledRule, Location.None)); 567compilationContext.ReportDiagnostic(Diagnostic.Create(DisabledRule, Location.None)); 610codeBlockContext.ReportDiagnostic(Diagnostic.Create(CodeBlockTopLevelRule, codeBlockContext.OwningSymbol.Locations[0], codeBlockContext.OwningSymbol.Name)); 619codeBlockContext.ReportDiagnostic(Diagnostic.Create(CodeBlockPerCompilationRule, codeBlockContext.OwningSymbol.Locations[0], codeBlockContext.OwningSymbol.Name)); 658syntaxNodeContext.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptor, syntaxNodeContext.Node.GetLocation())); 688context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.GetLocation())); 728context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.GetLocation())); 766context.ReportDiagnostic(Diagnostic.Create(Rule, context.Symbol.Locations[0])); 798context.ReportDiagnostic(Diagnostic.Create(Rule, ns.Locations[0])); 825compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 856compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 877compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 904c.ReportDiagnostic(Diagnostic.Create(Descriptor, SourceLocation.Create(c.Tree, _badSpan))); 954Diagnostic.Create(Descriptor, _invalidLocation); 1003symbolContext.ReportDiagnostic(Diagnostic.Create(Rule, symbolContext.Symbol.Locations[0])); 1043symbolContext.ReportDiagnostic(Diagnostic.Create(Rule, symbolContext.Symbol.Locations[0], symbolContext.Symbol.Name)); 1081context.ReportDiagnostic(Diagnostic.Create(Descriptor, tree.GetRoot().GetLocation())); 1107Diagnostic.Create(Descriptor, context.SemanticModel.SyntaxTree.GetRoot().GetLocation()))); 1177var diagnostic = Diagnostic.Create(Descriptor, symbolContext.Symbol.Locations[0], symbolContext.Symbol.Name); 1219var diagnostic = Diagnostic.Create(Descriptor, symbolContext.Symbol.Locations[0]); 1263var diagnostic = Diagnostic.Create(Descriptor, location, _actionKind); 1392var diagnostic = Diagnostic.Create(Descriptor, c.OwningSymbol.Locations[0], c.OwningSymbol.Name, operationRoot.Kind); 1445var diagnostic = Diagnostic.Create(Descriptor, operation.Syntax.GetLocation(), operation.Field.Name, operation.Field.ConstantValue); 1466var diagnostic = Diagnostic.Create(Descriptor, operationContext.Operation.Syntax.GetLocation(), operationContext.ContainingSymbol.Name); 1653var diagnostic = Diagnostic.Create(rule, Location.None, args); 1671var diagnostic = Diagnostic.Create(Warning, location, messageArguments); 1675diagnostic = Diagnostic.Create(Error, location, messageArguments); 1706var diagnostic = Diagnostic.Create(Rule, namedType.Locations[0], namedType.Name, namedTypes.Count); 1814var diagnostic = Diagnostic.Create(descriptor, symbolContext.Symbol.Locations[0], symbolContext.Symbol.Name); 1823var diagnostic = Diagnostic.Create(descriptor, Location.None, treeContext.Tree.FilePath); 1827diagnostic = Diagnostic.Create(UniqueTextFileDescriptor, Location.None, treeContext.Tree.FilePath); 1838var diagnostic = Diagnostic.Create(NumberOfUniqueTextFileDescriptor, Location.None, _textCallbackSet.Count); 1864context.ReportDiagnostic(Diagnostic.Create(ParameterDescriptor, context.Symbol.Locations[0])); 2034compilationEndContext.ReportDiagnostic(Diagnostic.Create(SymbolStartedEndedDifferRule, Location.None, symbolsStartedStr, symbolsEndedStr, _analyzerId)); 2049diagnostics.Add(Diagnostic.Create(DuplicateStartActionRule, Location.None, symbolStartContext.Symbol.Name, _analyzerId)); 2059diagnostics.Add(Diagnostic.Create(DuplicateEndActionRule, Location.None, symbolEndContext.Symbol.Name, _analyzerId)); 2064symbolEndContext.ReportDiagnostic(Diagnostic.Create(rule, Location.None, symbolStartContext.Symbol.Name, _analyzerId)); 2074operationContext.ReportDiagnostic(Diagnostic.Create(OperationRule, Location.None, symbolStartContext.Symbol.Name, operationContext.ContainingSymbol.Name, operationContext.Operation.Syntax.ToString(), _analyzerId)); 2110diagnostics.Add(Diagnostic.Create(SymbolStartedOrderingRule, Location.None, member, symbolStarted, _analyzerId)); 2134diagnostics.Add(Diagnostic.Create(SymbolEndedOrderingRule, Location.None, container, symbolEnded, _analyzerId)); 2149diagnostics.Add(Diagnostic.Create(OperationOrderingRule, Location.None, symbolStartContext.Symbol, operationContext.Operation.Syntax.ToString(), _analyzerId)); 2455Diagnostic.Create(_rule, Location.None, GetSortedSymbolCallbacksString()))); 2463=> reportDiagnostic(Diagnostic.Create(_rule, symbol.Locations[0], symbol.Name)); 2486compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 2570endContext => endContext.ReportDiagnostic(Diagnostic.Create(s_descriptor, context.OwningSymbol.Locations[0]))); 2603context.ReportDiagnostic(Diagnostic.Create(Descriptor, variable.Identifier.GetLocation())); 2610context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Symbol.Locations[0])), 2661context.ReportDiagnostic(Diagnostic.Create(Descriptor, location)); 2697context.ReportDiagnostic(Diagnostic.Create(s_descriptor, context.Tree.GetRoot().GetLocation())); 2852reportDiagnostic(Diagnostic.Create(s_descriptor, localDecl.GetLocation(), arg)); 2882context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation())), 2888context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Operation.Syntax.GetLocation())), 2968reportDiagnostic(Diagnostic.Create(s_descriptor, analysisLocation));
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
295context.ReportDiagnostic(Diagnostic.Create(descriptor, local.Locations.FirstOrDefault(), local, moreSpecificType)); 300context.ReportDiagnostic(Diagnostic.Create(descriptor, field.Locations.FirstOrDefault(), field, moreSpecificType));
Diagnostics\EmptyArrayAnalyzer.cs (1)
56context.ReportDiagnostic(Diagnostic.Create(UseArrayEmptyDescriptor, arrayCreationExpression.GetLocation()));
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
144context.ReportDiagnostic(Diagnostic.Create(descriptor, field.Locations.FirstOrDefault()));
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
135context.ReportDiagnostic(Diagnostic.Create(descriptor, local.Locations.FirstOrDefault()));
Diagnostics\OperationTestAnalyzer.cs (64)
59operationContext.ReportDiagnostic(Diagnostic.Create(InvalidStatementDescriptor, operationContext.Operation.Syntax.GetLocation())); 63operationContext.ReportDiagnostic(Diagnostic.Create(InvalidExpressionDescriptor, operationContext.Operation.Syntax.GetLocation())); 73operationContext.ReportDiagnostic(Diagnostic.Create(IsInvalidDescriptor, operationContext.Operation.Syntax.GetLocation())); 109operationContext.ReportDiagnostic(Diagnostic.Create(ExpressionDescriptor, operationContext.Operation.Syntax.GetLocation())); 288context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 484context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 549operationContext.ReportDiagnostic(Diagnostic.Create(InvalidArgumentDescriptor, argument.Syntax.GetLocation())); 555operationContext.ReportDiagnostic(Diagnostic.Create(UseDefaultArgumentDescriptor, invocation.Syntax.GetLocation(), argument.Parameter.Name)); 601context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 635operationContext.ReportDiagnostic(Diagnostic.Create(SeventeenDescriptor, literal.Syntax.GetLocation())); 678context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 724context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 765context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 805context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 862context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 923context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.GetLocation())); 954operationContext.ReportDiagnostic(Diagnostic.Create(instanceReference.IsImplicit ? ImplicitInstanceDescriptor : ExplicitInstanceDescriptor, 1034operationContext.ReportDiagnostic(Diagnostic.Create(EventReferenceDescriptor, operationContext.Operation.Syntax.GetLocation())); 1042operationContext.ReportDiagnostic(Diagnostic.Create(eventAssignment.Adds ? HandlerAddedDescriptor : HandlerRemovedDescriptor, operationContext.Operation.Syntax.GetLocation())); 1046operationContext.ReportDiagnostic(Diagnostic.Create(InvalidEventDescriptor, eventAssignment.Syntax.GetLocation())); 1054operationContext.ReportDiagnostic(Diagnostic.Create(PropertyReferenceDescriptor, operationContext.Operation.Syntax.GetLocation())); 1061operationContext.ReportDiagnostic(Diagnostic.Create(FieldReferenceDescriptor, operationContext.Operation.Syntax.GetLocation())); 1068operationContext.ReportDiagnostic(Diagnostic.Create(MethodBindingDescriptor, operationContext.Operation.Syntax.GetLocation())); 1111operationContext.ReportDiagnostic(Diagnostic.Create(LongParamsDescriptor, argument.Value.Syntax.GetLocation())); 1126operationContext.ReportDiagnostic(Diagnostic.Create(InvalidConstructorDescriptor, creation.Syntax.GetLocation())); 1138operationContext.ReportDiagnostic(Diagnostic.Create(LongParamsDescriptor, argument.Value.Syntax.GetLocation())); 1184operationContext.ReportDiagnostic(Diagnostic.Create(EqualsValueDescriptor, equalsValue.Syntax.GetLocation())); 1195operationContext.ReportDiagnostic(Diagnostic.Create(EqualsValueDescriptor, equalsValue.Syntax.GetLocation())); 1226operationContext.ReportDiagnostic(Diagnostic.Create(NoneOperationDescriptor, operationContext.Operation.Syntax.GetLocation())); 1262operationContext.ReportDiagnostic(Diagnostic.Create(AddressOfDescriptor, addressOfOperation.Syntax.GetLocation())); 1266operationContext.ReportDiagnostic(Diagnostic.Create(InvalidAddressOfReferenceDescriptor, addressOfOperation.Reference.Syntax.GetLocation())); 1314operationContext.ReportDiagnostic(Diagnostic.Create(LambdaExpressionDescriptor, operationContext.Operation.Syntax.GetLocation())); 1323operationContext.ReportDiagnostic(Diagnostic.Create(TooManyStatementsInLambdaExpressionDescriptor, operationContext.Operation.Syntax.GetLocation())); 1336operationContext.ReportDiagnostic(Diagnostic.Create(NoneOperationInLambdaExpressionDescriptor, operationContext.Operation.Syntax.GetLocation())); 1408operationContext.ReportDiagnostic(Diagnostic.Create(StaticMemberDescriptor, operation.Syntax.GetLocation())); 1412operationContext.ReportDiagnostic(Diagnostic.Create(StaticMemberWithInstanceDescriptor, operation.Syntax.GetLocation())); 1452operationContext.ReportDiagnostic(Diagnostic.Create(LabelDescriptor, operationContext.Operation.Syntax.GetLocation())); 1466operationContext.ReportDiagnostic(Diagnostic.Create(GotoDescriptor, branch.Syntax.GetLocation())); 1518operationContext.ReportDiagnostic(Diagnostic.Create(OperatorAddMethodDescriptor, binary.Syntax.GetLocation())); 1523operationContext.ReportDiagnostic(Diagnostic.Create(DoubleMultiplyDescriptor, binary.Syntax.GetLocation())); 1534operationContext.ReportDiagnostic(Diagnostic.Create(OperatorMinusMethodDescriptor, unary.Syntax.GetLocation())); 1539operationContext.ReportDiagnostic(Diagnostic.Create(BooleanNotDescriptor, unary.Syntax.GetLocation())); 1544operationContext.ReportDiagnostic(Diagnostic.Create(BooleanNotDescriptor, unary.Syntax.GetLocation())); 1573Diagnostic.Create(BinaryUserDefinedOperatorDescriptor, 1626Diagnostic.Create(BinaryOperatorDescriptor, 1650Diagnostic.Create(UnaryOperatorDescriptor, 1701Diagnostic.Create(NullOperationSyntaxDescriptor, null)); 1706Diagnostic.Create(ParamsArrayOperationDescriptor, 1791operationContext.ReportDiagnostic(Diagnostic.Create(InvalidBinaryDescriptor, binary.Syntax.GetLocation())); 1799operationContext.ReportDiagnostic(Diagnostic.Create(InvalidUnaryDescriptor, unary.Syntax.GetLocation())); 1807operationContext.ReportDiagnostic(Diagnostic.Create(InvalidIncrementDescriptor, inc.Syntax.GetLocation())); 1848operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessOperationDescriptor, conditionalAccess.Syntax.GetLocation())); 1857operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessInstanceOperationDescriptor, conditionalAccessInstance.Syntax.GetLocation())); 1897operationContext.ReportDiagnostic(Diagnostic.Create(InvalidConversionExpressionDescriptor, conversion.Syntax.GetLocation())); 1935operationContext.ReportDiagnostic(Diagnostic.Create(ForLoopConditionCrashDescriptor, forLoop.LimitValue.Syntax.GetLocation())); 1974operationContext.ReportDiagnostic(Diagnostic.Create(UnaryTrueDescriptor, unary.Syntax.GetLocation())); 1978operationContext.ReportDiagnostic(Diagnostic.Create(UnaryFalseDescriptor, unary.Syntax.GetLocation())); 2015operationContext.ReportDiagnostic(Diagnostic.Create(AssignmentOperationDescriptor, operationContext.Operation.Syntax.GetLocation())); 2023syntaxContext.ReportDiagnostic(Diagnostic.Create(AssignmentSyntaxDescriptor, syntaxContext.Node.GetLocation())); 2052operationContext.ReportDiagnostic(Diagnostic.Create(LiteralDescriptor, literal.Syntax.GetLocation(), literal.Syntax.ToString())); 2080Diagnostic.Create(OperationActionDescriptor, operationContext.Operation.Syntax.GetLocation(), "Operation", "Analysis")); 2111Diagnostic.Create(OperationActionDescriptor, operationContext.Operation.Syntax.GetLocation(), "Operation", "CompilationStart within Analysis")); 2143syntaxContext.ReportDiagnostic(Diagnostic.Create(GetOperationDescriptor, node.GetLocation())); 2155syntaxContext.ReportDiagnostic(Diagnostic.Create(GetOperationDescriptor, node.GetLocation()));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (9)
43context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, Location.None, messageArgs: Id)); 69context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Symbol.Locations.First(), messageArgs: context.Symbol.Name)); 100context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Symbol.Locations.First(), messageArgs: context.Symbol.Name)); 154context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.OwningSymbol.Locations.First(), messageArgs: context.OwningSymbol.Name + ":end")); 160context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.GetLocation(), messageArgs: context.Node.ToFullString())); 173context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.OwningSymbol.Locations.First(), messageArgs: context.OwningSymbol.Name + ":end")); 179context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.GetLocation(), messageArgs: context.Node.ToFullString())); 213context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, comment.GetLocation(), messageArgs: comment.ToFullString())); 248context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, nodeOrToken.GetLocation(), messageArgs: nodeOrToken.ToString()));
SourceGeneration\TestGenerators.cs (1)
69context.ReportDiagnostic(Diagnostic.Create(Descriptor, _produceLocation(context)));
Microsoft.CodeAnalysis.UnitTests (2)
Diagnostics\DiagnosticLocalizationTests.cs (1)
87var localizableDiagnostic = Diagnostic.Create(descriptor, Location.None);
Diagnostics\SarifErrorLoggerTests.cs (1)
82logger.LogDiagnostic(Diagnostic.Create(descriptor, Location.None), null);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
CommandLineTests.vb (3)
10944context.ReportDiagnostic(Diagnostic.Create(Hidden01, context.Node.GetLocation())) 10969context.ReportDiagnostic(Diagnostic.Create(Info01, context.Node.GetLocation())) 11043context.ReportDiagnostic(Diagnostic.Create(Error01, context.Node.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (17)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
35Sub(c) c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Suppression\SuppressionTests.vb (16)
711context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 786context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 830context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 896context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1018context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1023context.ReportDiagnostic(Diagnostic.Create(_descriptor, ns.Name.GetLocation())) 1028context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())) 1033context.ReportDiagnostic(Diagnostic.Create(_descriptor, p.Identifier.GetLocation())) 1038context.ReportDiagnostic(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation())) 1043context.ReportDiagnostic(Diagnostic.Create(_descriptor, e.Identifier.GetLocation())) 1734context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1739context.ReportDiagnostic(Diagnostic.Create(_descriptor, ns.Name.GetLocation())) 1744context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())) 1749context.ReportDiagnostic(Diagnostic.Create(_descriptor, p.Identifier.GetLocation())) 1754context.ReportDiagnostic(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation())) 1759context.ReportDiagnostic(Diagnostic.Create(_descriptor, e.Identifier.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Parser\ParseDirectives.vb (4)
3187Return CodeAnalysis.Diagnostic.Create(d, varDecl.AsClause.GetLocation) 3294Return CodeAnalysis.Diagnostic.Create(d, varDecl.AsClause.GetLocation) 3625Return CodeAnalysis.Diagnostic.Create(d, varDecl.AsClause.GetLocation) 3652Return CodeAnalysis.Diagnostic.Create(d, varDecl.AsClause.GetLocation)
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\TextLoader.cs (1)
179Diagnostic.Create(WorkspaceDiagnosticDescriptors.ErrorReadingFileContent, location, new[] { display, message }));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
74context.ReportDiagnostic(Diagnostic.Create(Descriptor, node.Token.GetLocation()));
Microsoft.DotNet.CodeAnalysis (7)
Analyzers\AppContextDefaultsAnalyzer.cs (4)
76context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultNotInitializedToTrueDiagnostic, args.GetLocation(), call)); 83context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultValueDefinedOutsideIfConditionDiagnostic, args.GetLocation(), call)); 91context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultValueDefinedOutsideIfConditionDiagnostic, args.GetLocation(), call)); 98context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultUsedUnexpectedIfStatementDiagnostic, containingIfStatement.GetLocation()));
Analyzers\MembersMustExistAnalyzer.cs (1)
39context.ReportDiagnostic(Diagnostic.Create(s_memberMustExistDiagnostic, Location.None, missingAPI));
Analyzers\PinvokeAnalyzer.cs (1)
163context.ReportDiagnostic(Diagnostic.Create(InvalidPinvokeCall, synref.GetSyntax().GetLocation(), data.ModuleName + "!" + (data.EntryPointName ?? methodSymbol.Name), altMsg));
Analyzers\ResourceUsageAnalyzer.cs (1)
53context.ReportDiagnostic(Diagnostic.Create(InvalidSRFormatCall, invokeExpr.GetLocation(), invokeExpr.GetText()));
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
723_reportDiagnostic(Diagnostic.Create(desc, location, messageArgs));
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
866_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>())); 869_reportDiagnostic(Diagnostic.Create(desc, location, messageArgs));
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
101context.ReportDiagnostic(Diagnostic.Create(diagnostic, location: null));
Microsoft.Gen.ContextualOptions (4)
Parser.cs (4)
32.Select(modifier => Diagnostic.Create(DiagDescriptors.ContextCannotBeStatic, modifier.GetLocation(), type.Name))); 46.Select(modifier => Diagnostic.Create(DiagDescriptors.ContextCannotBeRefLike, modifier.GetLocation(), type.Name))); 57type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextMustBePartial, def.Identifier.GetLocation(), type.Name))); 68type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextDoesNotHaveValidProperties, def.Identifier.GetLocation(), type.Name)));
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
746var d = Diagnostic.Create(desc, location, messageArgs);
Microsoft.Gen.Metrics (2)
Parser.cs (2)
598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>())); 603_reportDiagnostic(Diagnostic.Create(desc, location, messageArgs));
Microsoft.Gen.MetricsReports (3)
MetricsReportsGenerator.cs (1)
80context.ReportDiagnostic(Diagnostic.Create(diagnostic, location: null));
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>())); 603_reportDiagnostic(Diagnostic.Create(desc, location, messageArgs));
Microsoft.Interop.ComInterfaceGenerator (8)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (4)
120Diagnostic.Create( 161Diagnostic.Create( 181Diagnostic.Create( 191Diagnostic.Create(
VtableIndexStubGenerator.cs (4)
400return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 408return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 415return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 421return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.Identifier.GetLocation(), method.Name);
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSExportGenerator.cs (3)
344return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 352return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 359return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
JSImportGenerator.cs (3)
223return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 231return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 238return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.SourceGeneration (1)
DiagnosticExtensions.cs (1)
97return Diagnostic.Create(
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
133context.ReportDiagnostic(Diagnostic.Create(Rule, method.Locations[0]));
Microsoft.ML.InternalCodeAnalyzer (11)
BaseTestClassAnalyzer.cs (1)
78context.ReportDiagnostic(Diagnostic.Create(Rule, namedType.Locations[0], namedType));
BestFriendAnalyzer.cs (1)
110var diagnostic = Diagnostic.Create(Rule, node.GetLocation(), symbol.Name);
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
66var diagnostic = Diagnostic.Create(Rule, attribute.ApplicationSyntaxReference.GetSyntax().GetLocation(), context.Symbol.Name);
ContractsCheckAnalyzer.cs (4)
211context.ReportDiagnostic(Diagnostic.Create( 231context.ReportDiagnostic(Diagnostic.Create( 238context.ReportDiagnostic(Diagnostic.Create( 243context.ReportDiagnostic(Diagnostic.Create(
InstanceInitializerAnalyzer.cs (2)
59var diagnostic = Diagnostic.Create(Rule, symbol.Locations[0], symbol.Name, "field"); 75var diagnostic = Diagnostic.Create(Rule, symbol.Locations[0], symbol.Name, "property");
NameAnalyzer.cs (1)
172var diagnostic = Diagnostic.Create(PrivateFieldName.Rule, identifier.GetLocation(), name);
SingleVariableDeclarationAnalyzer.cs (1)
47var diagnostic = Diagnostic.Create(Rule, context.Node.GetLocation(), jointVariableNames);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (1)
111c.ReportDiagnostic(Diagnostic.Create(descriptor, c.Tree.GetLocation(TextSpan.FromBounds(0, 0))));
Roslyn.VisualStudio.Next.UnitTests (2)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
276c.ReportDiagnostic(Diagnostic.Create(_supportedDiagnostics[0], c.Tree.GetLocation(TextSpan.FromBounds(0, 1)))); 294c.ReportDiagnostic(Diagnostic.Create(_supportedDiagnostics[0], c.Tree.GetLocation(TextSpan.FromBounds(0, 1))));
System.Private.CoreLib.Generators (9)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (9)
332context.ReportDiagnostic(Diagnostic.Create(RuleCantParse, expressionToDecompose.GetLocation())); 343context.ReportDiagnostic(Diagnostic.Create(RuleCantParse, expressionToDecompose.GetLocation())); 356context.ReportDiagnostic(Diagnostic.Create(RuleCantParse, expressionToDecompose.GetLocation())); 365context.ReportDiagnostic(Diagnostic.Create(RuleCantParse, expressionToDecompose.GetLocation())); 373context.ReportDiagnostic(Diagnostic.Create(RuleCantParse, expressionToDecompose.GetLocation())); 546context.ReportDiagnostic(Diagnostic.Create(RuleAttributeNotSpecificEnough, operation.Syntax.GetLocation(), attributeExplicitlyAllowsRelatedSymbol.ToDisplayString())); 613context.ReportDiagnostic(Diagnostic.Create(RuleCantParse, operation.Syntax.GetLocation())); 686context.ReportDiagnostic(Diagnostic.Create(Rule, operation.Syntax.GetLocation(), symbol.ContainingSymbol.ToDisplayString())); 688context.ReportDiagnostic(Diagnostic.Create(RuleHelper, operation.Syntax.GetLocation(), symbol.ToDisplayString()));
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\DiagnosticInfo.cs (1)
38=> Diagnostic.Create(Descriptor, Location, MessageArgs);
System.Text.RegularExpressions.Generator (3)
RegexGenerator.cs (1)
358public Diagnostic ToDiagnostic() => Diagnostic.Create(descriptor, location, arg is null ? [] : [arg]);
UpgradeToGeneratedRegexAnalyzer.cs (2)
113context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.UseRegexSourceGeneration, syntaxNodeForDiagnostic.GetLocation())); 145context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.UseRegexSourceGeneration, syntaxNodeForDiagnostic.GetLocation()));
System.Windows.Forms.Analyzers (2)
System\Windows\Forms\Analyzers\AppManifestAnalyzer.cs (2)
66context.ReportDiagnostic(Diagnostic.Create(SharedDiagnosticDescriptors.s_cSharpMigrateHighDpiSettings, 73context.ReportDiagnostic(Diagnostic.Create(SharedDiagnosticDescriptors.s_visualBasicMigrateHighDpiSettings,
System.Windows.Forms.Analyzers.CSharp (4)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
69Diagnostic diagnostic = Diagnostic.Create(
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
72var diagnostic = Diagnostic.Create(
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (1)
43context.ReportDiagnostic(Diagnostic.Create(
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.cs (1)
53diagnostic = Diagnostic.Create(CSharpDiagnosticDescriptors.s_propertyCantBeSetToValue,