369 references to ReportDiagnostic
Aspire.Hosting.Integration.Analyzers (1)
AspireExportAnalyzer.cs (1)
357context.ReportDiagnostic(Diagnostic.Create(
ILLink.RoslynAnalyzer (1)
COMAnalyzer.cs (1)
58operationContext.ReportDiagnostic(Diagnostic.Create(s_correctnessOfCOMCannotBeGuaranteed,
Microsoft.Analyzers.Extra (14)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
124analysisContext.ReportDiagnostic(diagnostic);
CallAnalysis\Arrays.cs (1)
129context.ReportDiagnostic(diagnostic);
CallAnalysis\LegacyCollection.cs (1)
34context.ReportDiagnostic(diagnostic);
CallAnalysis\LegacyLogging.cs (1)
39context.ReportDiagnostic(diagnostic);
CallAnalysis\Split.cs (1)
29context.ReportDiagnostic(diagnostic);
CallAnalysis\StartsEndsWith.cs (1)
60context.ReportDiagnostic(diagnostic);
CallAnalysis\StaticTime.cs (2)
53context.ReportDiagnostic(diagnostic); 59context.ReportDiagnostic(diagnostic);
CallAnalysis\ValueTuple.cs (2)
43context.ReportDiagnostic(diagnostic); 49context.ReportDiagnostic(diagnostic);
CoalesceAnalyzer.cs (2)
53operationAnalysisContext.ReportDiagnostic(diagnostic); 80operationAnalysisContext.ReportDiagnostic(diagnostic);
ConditionalAccessAnalyzer.cs (1)
112operationAnalysisContext.ReportDiagnostic(diagnostic);
UsingToStringInLoggersAnalyzer.cs (1)
45context.ReportDiagnostic(diagnostic);
Microsoft.Analyzers.Local (3)
CallAnalysis\Throws.cs (2)
42context.ReportDiagnostic(diagnostic); 56context.ReportDiagnostic(diagnostic);
CallAnalysis\ToInvariantString.cs (1)
52context.ReportDiagnostic(diagnostic);
Microsoft.AspNetCore.App.Analyzers (24)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
230context.ReportDiagnostic(Diagnostic.Create(
Http\HeaderDictionaryAddAnalyzer.cs (1)
74context.ReportDiagnostic(Diagnostic.Create(
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
175context.ReportDiagnostic(Diagnostic.Create(
Http\RequestDelegateReturnTypeAnalyzer.cs (1)
78context.ReportDiagnostic(Diagnostic.Create(
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
45context.ReportDiagnostic(Diagnostic.Create(
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
54context.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\WebApplicationBuilderAnalyzer.cs (11)
87context.ReportDiagnostic( 103context.ReportDiagnostic( 119context.ReportDiagnostic( 135context.ReportDiagnostic( 151context.ReportDiagnostic( 167context.ReportDiagnostic( 183context.ReportDiagnostic( 199context.ReportDiagnostic( 215context.ReportDiagnostic( 231context.ReportDiagnostic( 249context.ReportDiagnostic(
Microsoft.AspNetCore.Components.Analyzers (4)
ComponentParameterUsageAnalyzer.cs (1)
105context.ReportDiagnostic(Diagnostic.Create(
InternalUsageAnalyzer.cs (2)
137context.ReportDiagnostic(Diagnostic.Create( 147context.ReportDiagnostic(Diagnostic.Create(
InvokeAsyncOfObjectAnalyzer.cs (1)
80operationContext.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Components.SdkAnalyzers (3)
ComponentParameterUsageAnalyzer.cs (1)
105context.ReportDiagnostic(Diagnostic.Create(
InternalUsageAnalyzer.cs (2)
137context.ReportDiagnostic(Diagnostic.Create( 147context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Mvc.Analyzers (2)
AvoidHtmlPartialAnalyzer.cs (2)
31context.ReportDiagnostic(Diagnostic.Create( 38context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
121context.ReportDiagnostic(
ApiConventionAnalyzer.cs (3)
60context.ReportDiagnostic(Diagnostic.Create( 66context.ReportDiagnostic(Diagnostic.Create( 86context.ReportDiagnostic(Diagnostic.Create(
Microsoft.CodeAnalysis.Analyzers (37)
ImmutableObjectMethodAnalyzer.cs (1)
99context.ReportDiagnostic(invocation.CreateDiagnostic(DoNotIgnoreReturnValueDiagnosticRule, type.Name, methodName));
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (6)
163context.ReportDiagnostic(binary.Syntax.GetLocation().CreateDiagnostic(s_equalityRule, s_EqualityRuleProperties)); 184context.ReportDiagnostic(invocationOperation.CreateDiagnostic(s_getHashCodeRule, s_GetHashCodeRuleProperties)); 195context.ReportDiagnostic(invocationOperation.Syntax.GetLocation().CreateDiagnostic(s_equalityRule, s_EqualityRuleProperties)); 208context.ReportDiagnostic(invocationOperation.CreateDiagnostic(s_getHashCodeRule, s_GetHashCodeRuleProperties)); 220context.ReportDiagnostic(invocationOperation.CreateDiagnostic(s_collectionRule, s_CollectionRuleProperties)); 270context.ReportDiagnostic(objectCreation.CreateDiagnostic(s_collectionRule, s_CollectionRuleProperties));
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (1)
186operationAnalysisContext.ReportDiagnostic(diagnostic);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (10)
630operationAnalysisContext.ReportDiagnostic(creation.Value.CreateDiagnostic(UseLocalizableStringsInDescriptorRule, WellKnownTypeNames.MicrosoftCodeAnalysisLocalizableString)); 814analyzeStringValueCore(argumentValue, argument, argumentValueLocation, operationAnalysisContext.ReportDiagnostic); 826operationAnalysisContext.ReportDiagnostic, operationAnalysisContext.CancellationToken); 1045operationAnalysisContext.ReportDiagnostic(diagnostic); 1080operationAnalysisContext.ReportDiagnostic(diagnostic); 1252operationAnalysisContext.ReportDiagnostic(argument.Value.Syntax.CreateDiagnostic(DoNotUseReservedDiagnosticIdRule, ruleId)); 1258AnalyzeAllowedIdsInfoList(ruleId, argument, diagnosticCategoryAndIdRangeText, category, allowedIdsInfoListOpt, operationAnalysisContext.ReportDiagnostic); 1268defaultSeverity, shippedData, unshippedData, operationAnalysisContext.ReportDiagnostic); 1273operationAnalysisContext.ReportDiagnostic(diagnostic); 1281operationAnalysisContext.ReportDiagnostic(diagnostic);
MetaAnalyzers\DoNotUseCompilationGetSemanticModelAnalyzer.cs (1)
68operationContext.ReportDiagnostic(invocation.Syntax.CreateDiagnostic(Rule));
MetaAnalyzers\PreferIsKindAnalyzer.cs (1)
93context.ReportDiagnostic(operation.LeftOperand.CreateDiagnostic(Rule));
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (17)
92VerifySymbol(context.ReportDiagnostic, objectCreation.Constructor, context.Operation.Syntax); 93VerifyType(context.ReportDiagnostic, objectCreation.Type, context.Operation.Syntax); 97VerifySymbol(context.ReportDiagnostic, invocation.TargetMethod, context.Operation.Syntax); 98VerifyType(context.ReportDiagnostic, invocation.TargetMethod.ContainingType, context.Operation.Syntax); 102VerifySymbol(context.ReportDiagnostic, memberReference.Member, context.Operation.Syntax); 103VerifyType(context.ReportDiagnostic, memberReference.Member.ContainingType, context.Operation.Syntax); 107VerifyType(context.ReportDiagnostic, arrayCreation.Type, context.Operation.Syntax); 111VerifyType(context.ReportDiagnostic, addressOf.Type, context.Operation.Syntax); 117VerifySymbol(context.ReportDiagnostic, conversion.OperatorMethod, context.Operation.Syntax); 118VerifyType(context.ReportDiagnostic, conversion.OperatorMethod.ContainingType, context.Operation.Syntax); 126VerifySymbol(context.ReportDiagnostic, unary.OperatorMethod, context.Operation.Syntax); 127VerifyType(context.ReportDiagnostic, unary.OperatorMethod.ContainingType, context.Operation.Syntax); 135VerifySymbol(context.ReportDiagnostic, binary.OperatorMethod, context.Operation.Syntax); 136VerifyType(context.ReportDiagnostic, binary.OperatorMethod.ContainingType, context.Operation.Syntax); 144VerifySymbol(context.ReportDiagnostic, incrementOrDecrement.OperatorMethod, context.Operation.Syntax); 145VerifyType(context.ReportDiagnostic, incrementOrDecrement.OperatorMethod.ContainingType, context.Operation.Syntax); 150VerifyType(context.ReportDiagnostic, typeOfOperation.TypeOperand, context.Operation.Syntax);
Microsoft.CodeAnalysis.CodeStyle (10)
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
229context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\ConvertTypeofToNameof\AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
42context.ReportDiagnostic(Diagnostic.Create(Descriptor, location));
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
77context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
125context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
112context.ReportDiagnostic(Diagnostic.Create(Descriptor,
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
88context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
188context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
52context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
63context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
134context.ReportDiagnostic(
Microsoft.CodeAnalysis.CSharp.Analyzers (2)
MetaAnalyzers\CSharpSemanticModelGetDeclaredSymbolAlwaysReturnsNullAnalyzer.cs (2)
91context.ReportDiagnostic(invocation.CreateDiagnostic(FieldDiagnosticDescriptor, syntaxNodeDerivingType.Name)); 96context.ReportDiagnostic(invocation.CreateDiagnostic(DiagnosticDescriptor, syntaxNodeDerivingType.Name));
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
204context.ReportDiagnostic(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
88context.ReportDiagnostic(CreateDiagnostic(result.Value, option.Notification, context.Options));
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (2)
78context.ReportDiagnostic( 108context.ReportDiagnostic(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
145context.ReportDiagnostic(
Microsoft.CodeAnalysis.CSharp.Features (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
204context.ReportDiagnostic(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
88context.ReportDiagnostic(CreateDiagnostic(result.Value, option.Notification, context.Options));
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (2)
78context.ReportDiagnostic( 108context.ReportDiagnostic(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
145context.ReportDiagnostic(
Microsoft.CodeAnalysis.Features (10)
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
229context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\ConvertTypeofToNameof\AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
42context.ReportDiagnostic(Diagnostic.Create(Descriptor, location));
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
77context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
125context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
112context.ReportDiagnostic(Diagnostic.Create(Descriptor,
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
88context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
188context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
52context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
63context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
134context.ReportDiagnostic(
Microsoft.CodeAnalysis.NetAnalyzers (209)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDirectlyAwaitATask.cs (4)
104context.ReportDiagnostic(forEachOperation.Collection.CreateDiagnostic(Rule)); 117context.ReportDiagnostic(awaitExpression.Operation.Syntax.CreateDiagnostic(Rule)); 143context.ReportDiagnostic(reportingOperation.CreateDiagnostic(Rule)); 170context.ReportDiagnostic(reportingOperation.CreateDiagnostic(Rule));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotRaiseExceptionsInUnexpectedLocations.cs (1)
113operationContext.ReportDiagnostic(
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumShouldNotHaveDuplicatedValues.cs (2)
109context.ReportDiagnostic(field.CreateDiagnostic(RuleDuplicatedValue, field.Name, field.ConstantValue!, duplicatedField.Name)); 130context.ReportDiagnostic(fieldOperation.CreateDiagnostic(RuleDuplicatedBitwiseValuePart, referencedField.Name));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PassSystemUriObjectsInsteadOfStrings.cs (1)
162context.ReportDiagnostic(
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidLengthCalculationWhenSlicingToEnd.cs (1)
78context.ReportDiagnostic(invocation.CreateDiagnostic(Rule, invocation.TargetMethod.ToDisplayString()));
Microsoft.CodeQuality.Analyzers\Maintainability\DoNotIgnoreMethodResults.cs (1)
226opContext.ReportDiagnostic(diagnostic);
Microsoft.CodeQuality.Analyzers\Maintainability\UseCrossPlatformIntrinsicsAnalyzer.cs (1)
371context.ReportDiagnostic(invocation.CreateDiagnostic(Rules[i], Properties[i]));
Microsoft.CodeQuality.Analyzers\Maintainability\UseNameofInPlaceOfString.cs (2)
73context.ReportDiagnostic(argument.Value.CreateDiagnostic(RuleWithSuggestion, stringText)); 80context.ReportDiagnostic(argument.Value.CreateDiagnostic(RuleWithSuggestion, stringText));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AssigningSymbolAndItsMemberInSameStatement.cs (1)
76context.ReportDiagnostic(diagnostic);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidDuplicateElementInitialization.cs (1)
67context.ReportDiagnostic(
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidInfiniteRecursion.cs (1)
77operationContext.ReportDiagnostic(
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidPropertySelfAssignment.cs (1)
78operationContext.ReportDiagnostic(diagnostic);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotCallOverridableMethodsInConstructors.cs (1)
74context.ReportDiagnostic(operation.Syntax.CreateDiagnostic(Rule));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotInitializeUnnecessarily.cs (2)
64context.ReportDiagnostic(init.CreateDiagnostic(DefaultRule, field.Name)); 87context.ReportDiagnostic(init.CreateDiagnostic(DefaultRule, prop.Name));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotPassDisposablesIntoUnawaitedTasks.cs (1)
76context.ReportDiagnostic(referencedArg.CreateDiagnostic(Rule));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\PreferJaggedArraysOverMultidimensional.cs (1)
125context.ReportDiagnostic(arrayCreationExpression.Syntax.CreateDiagnostic(BodyRule, context.ContainingSymbol.Name, arrayCreationExpression.Type));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\RethrowToPreserveStackDetails.cs (1)
61context.ReportDiagnostic(throwOperation.CreateDiagnostic(Rule));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\UseLiteralsWhereAppropriate.cs (2)
100context.ReportDiagnostic(lastField.CreateDiagnostic(EmptyStringRule, lastField.Name)); 104context.ReportDiagnostic(lastField.CreateDiagnostic(DefaultRule, lastField.Name));
Microsoft.NetCore.Analyzers\Data\ReviewSqlQueriesForSecurityVulnerabilities.cs (1)
238operationContext.ReportDiagnostic(syntax.CreateDiagnostic(Rule,
Microsoft.NetCore.Analyzers\ImmutableCollections\DoNotCallToImmutableCollectionOnAnImmutableCollectionValue.cs (1)
98operationContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshallingAnalyzer.DelegateInteropUsageAnalyzer.cs (2)
96AnalyzeMethodSignature(_autoLayoutCache, context.ReportDiagnostic, delegateType.DelegateInvokeMethod!, ImmutableArray.Create(operation.Syntax.GetLocation()), FeatureUnsupportedWhenRuntimeMarshallingDisabledDelegateUsage); 109AnalyzeMethod(context.ReportDiagnostic, functionPointerInvocation.Symbol);
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshallingAnalyzer.DisabledRuntimeMarshallingAssemblyAnalyzer.cs (3)
81context.ReportDiagnostic(invocation.CreateDiagnostic( 109AnalyzeMethodSignature(_autoLayoutCache, context.ReportDiagnostic, functionPointerInvocation.GetFunctionPointerSignature(), ImmutableArray.Create(functionPointerInvocation.WrappedOperation.Syntax.GetLocation())); 115AnalyzeMethod(context.ReportDiagnostic, functionPointerInvocation.Symbol);
Microsoft.NetCore.Analyzers\InteropServices\UseValidPlatformString.cs (1)
164context.ReportDiagnostic(argument.Syntax.CreateDiagnostic(UnknownPlatform, platformName));
Microsoft.NetCore.Analyzers\Performance\AvoidPotentiallyExpensiveCallWhenLogging.cs (1)
96context.ReportDiagnostic(argument.CreateDiagnostic(Rule, reason));
Microsoft.NetCore.Analyzers\Performance\AvoidSingleUseOfLocalJsonSerializerOptions.cs (1)
73context.ReportDiagnostic(operation.CreateDiagnostic(s_Rule));
Microsoft.NetCore.Analyzers\Performance\CollapseMultiplePathOperations.cs (1)
179context.ReportDiagnostic(invocation.CreateDiagnostic(Rule, properties.ToImmutable(), methodName));
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (2)
193context.ReportDiagnostic(parameterCheckDiagnostic); 202context.ReportDiagnostic(valueDiagnostic);
Microsoft.NetCore.Analyzers\Performance\DoNotGuardCall.cs (1)
118context.ReportDiagnostic(conditionInvocation.CreateDiagnostic(
Microsoft.NetCore.Analyzers\Performance\DoNotUseAsParallelInForEachLoop.cs (1)
96context.ReportDiagnostic(invocation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Performance\PreferConvertToHexStringOverBitConverter.cs (1)
84context.ReportDiagnostic(outerInvocation.CreateDiagnostic(
Microsoft.NetCore.Analyzers\Performance\PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.cs (1)
196context.ReportDiagnostic(diagnostic);
Microsoft.NetCore.Analyzers\Performance\PreferHashDataOverComputeHash.cs (1)
235context.ReportDiagnostic(diagnostics);
Microsoft.NetCore.Analyzers\Performance\PreferLengthCountIsEmptyOverAnyAnalyzer.cs (3)
119context.ReportDiagnostic(invocation.CreateDiagnostic(IsEmptyDescriptor, properties: properties.ToImmutable())); 125context.ReportDiagnostic(invocation.CreateDiagnostic(LengthDescriptor, properties: properties.ToImmutable())); 132context.ReportDiagnostic(invocation.CreateDiagnostic(CountDescriptor, properties: properties.ToImmutable()));
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Analyzer.cs (2)
295context.ReportDiagnostic(invocation.CreateDiagnostic(chosenRule, dict, diagnosableMethod)); 332context.ReportDiagnostic(binaryOperation.CreateDiagnostic(RecommendCaseInsensitiveStringEqualsRule, dict));
Microsoft.NetCore.Analyzers\Performance\UseAsSpanInsteadOfRangeIndexer.cs (1)
202operationContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Performance\UseCompositeFormat.cs (1)
137operationContext.ReportDiagnostic(stringArg.CreateDiagnostic(
Microsoft.NetCore.Analyzers\Performance\UseCountProperly.cs (4)
411context.ReportDiagnostic( 429context.ReportDiagnostic( 441context.ReportDiagnostic( 458context.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Performance\UseSearchValues.cs (1)
90context.ReportDiagnostic(valuesArgument.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Performance\UseSpanClearInsteadOfFill.cs (1)
72context.ReportDiagnostic(invocation.CreateDiagnostic(s_Rule));
Microsoft.NetCore.Analyzers\Performance\UseStartsWithInsteadOfIndexOfComparisonWithZero.cs (1)
117context.ReportDiagnostic(binaryOperation.CreateDiagnostic(Rule, additionalLocations, properties));
Microsoft.NetCore.Analyzers\Performance\UseStringContainsCharOverloadWithSingleCharactersAnalyzer.cs (1)
73context.ReportDiagnostic(argumentOperation.CreateDiagnostic(s_rule_CA1847));
Microsoft.NetCore.Analyzers\Performance\UseStringMethodCharOverloadWithSingleCharacters.cs (1)
146context.ReportDiagnostic(argumentList.CreateDiagnostic(rule, new[] { method }));
Microsoft.NetCore.Analyzers\Runtime\AvoidConstArrays.cs (1)
149context.ReportDiagnostic(arrayCreationOperation.CreateDiagnostic(Rule, properties.ToImmutable()));
Microsoft.NetCore.Analyzers\Runtime\AvoidRedundantRegexIsMatchBeforeMatch.cs (1)
91context.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\AvoidUnreliableStreamRead.cs (1)
86context.ReportDiagnostic(invocation.CreateDiagnostic(Rule, invocation.TargetMethod.ToDisplayString()));
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocations.cs (1)
122context.ReportDiagnostic(arrayCreationExpression.Syntax.CreateDiagnostic(UseArrayEmptyDescriptor, typeName));
Microsoft.NetCore.Analyzers\Runtime\BufferBlockCopyLengthAnalyzer.cs (3)
119context.ReportDiagnostic(countArgument.Value.CreateDiagnostic(Rule)); 149context.ReportDiagnostic(countArgument.Value.CreateDiagnostic(Rule)); 156context.ReportDiagnostic(countArgument.Value.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\CallGCSuppressFinalizeCorrectly.cs (2)
145analysisContext.ReportDiagnostic(invocationExpression.Syntax.CreateDiagnostic( 159analysisContext.ReportDiagnostic(invocationExpression.Syntax.CreateDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureAnalyzer.cs (2)
923context.ReportDiagnostic(operation.CreateDiagnostic(diagnosticDescriptorWithPlaceholdersForCustomMessage, diagnosticMessageArgument, url, customMessage)); 927context.ReportDiagnostic(operation.CreateDiagnostic(diagnosticDescriptor, diagnosticMessageArgument, url));
Microsoft.NetCore.Analyzers\Runtime\DisposableTypesShouldDeclareFinalizer.cs (1)
120operationAnalysisContext.ReportDiagnostic(containingType.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer.cs (1)
179context.ReportDiagnostic(invocation.CreateDiagnostic(rule, castFrom.ToDisplayString(), castTo.ToDisplayString()));
Microsoft.NetCore.Analyzers\Runtime\DoNotLockOnObjectsWithWeakIdentity.cs (2)
83context.ReportDiagnostic(operation.CreateDiagnostic(Rule, operation.Syntax.ToString())); 89context.ReportDiagnostic(operation.CreateDiagnostic(Rule, type.ToDisplayString()));
Microsoft.NetCore.Analyzers\Runtime\DoNotPassLiteralsAsLocalizedParameters.cs (2)
88AnalyzeArgument(argument.Parameter, containingPropertySymbol: null, operation: argument, reportDiagnostic: operationContext.ReportDiagnostic, GetUseNamingHeuristicOption(operationContext)); 102AnalyzeArgument(valueSetterParam, propertyReference.Property, assignment, operationContext.ReportDiagnostic, GetUseNamingHeuristicOption(operationContext));
Microsoft.NetCore.Analyzers\Runtime\DoNotRaiseReservedExceptionTypes.cs (2)
135context.ReportDiagnostic(objectCreation.CreateDiagnostic(TooGenericRule, typeSymbol.ToDisplayString(s_symbolDisplayFormat))); 139context.ReportDiagnostic(objectCreation.CreateDiagnostic(ReservedRule, typeSymbol.ToDisplayString(s_symbolDisplayFormat)));
Microsoft.NetCore.Analyzers\Runtime\DoNotUseEndOfStreamInAsyncMethods.cs (1)
77context.ReportDiagnostic(operation.CreateDiagnostic(Rule, operation.Syntax.ToString()));
Microsoft.NetCore.Analyzers\Runtime\DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectly.cs (1)
83context.ReportDiagnostic(invocation.CreateDiagnostic(Rule, properties));
Microsoft.NetCore.Analyzers\Runtime\DoNotUseReferenceEqualsWithValueTypes.cs (1)
123operationContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\ForwardCancellationTokenToInvocations.Analyzer.cs (1)
115context.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\InstantiateArgumentExceptionsCorrectly.cs (2)
102context.ReportDiagnostic(context.Operation.Syntax.CreateDiagnostic(RuleNoArguments, creation.Type.Name)); 136context.ReportDiagnostic(diagnosticFound);
Microsoft.NetCore.Analyzers\Runtime\LoggerMessageDefineAnalyzer.cs (6)
132context.ReportDiagnostic(invocation.CreateDiagnostic(CA1848Rule, methodSymbol.ToDisplayString(GetLanguageSpecificFormat(invocation)))); 202context.ReportDiagnostic(formatExpression.CreateDiagnostic(CA2254Rule, methodSymbol.ToDisplayString(GetLanguageSpecificFormat(formatExpression)))); 222context.ReportDiagnostic(formatExpression.CreateDiagnostic(CA2023Rule)); 230context.ReportDiagnostic(formatExpression.CreateDiagnostic(CA2253Rule)); 234context.ReportDiagnostic(formatExpression.CreateDiagnostic(CA1727Rule)); 241context.ReportDiagnostic(formatExpression.CreateDiagnostic(CA2017Rule));
Microsoft.NetCore.Analyzers\Runtime\NormalizeStringsToUppercase.cs (1)
88operationAnalysisContext.ReportDiagnostic(diagnostic);
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitStringAnalyzer.cs (1)
78context.ReportDiagnostic(firstArgument.Value.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\PreferDictionaryContainsMethods.cs (2)
154context.ReportDiagnostic(diagnostic); 175context.ReportDiagnostic(diagnostic);
Microsoft.NetCore.Analyzers\Runtime\PreferJsonElementParse.cs (1)
111context.ReportDiagnostic(propertyReference.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\PreferStreamAsyncMemoryOverloads.cs (1)
241context.ReportDiagnostic(invocation.CreateDiagnostic(rule, ruleMessageMethod, ruleMessagePreferredMethod));
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOfAnalyzer.cs (1)
158context.ReportDiagnostic(binaryOperation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\PreferTypedStringBuilderAppendOverloads.cs (2)
133operationContext.ReportDiagnostic(toStringInvoke.CreateDiagnostic(Rule)); 146operationContext.ReportDiagnostic(objectCreation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\PreventNumericIntPtrUIntPtrBehavioralChanges.cs (5)
88context.ReportDiagnostic(binaryOperation.CreateDiagnostic(OperatorThrowsRule, binaryOperator)); 103context.ReportDiagnostic(explicitConversion.CreateDiagnostic(ConversionThrowsRule, 109context.ReportDiagnostic(explicitConversion.CreateDiagnostic(ConversionThrowsRule, 119context.ReportDiagnostic(explicitConversion.CreateDiagnostic(ConversionNotThrowRule, 126context.ReportDiagnostic(explicitConversion.CreateDiagnostic(ConversionNotThrowRule,
Microsoft.NetCore.Analyzers\Runtime\ProvideCorrectArgumentsToFormattingMethods.cs (3)
84operationContext.ReportDiagnostic(operationContext.Operation.Syntax.CreateDiagnostic(InvalidFormatRule)); 100operationContext.ReportDiagnostic(operationContext.Operation.Syntax.CreateDiagnostic(ArgumentCountRule)); 139operationContext.ReportDiagnostic(operationContext.Operation.Syntax.CreateDiagnostic(ArgumentCountRule));
Microsoft.NetCore.Analyzers\Runtime\SpecifyCultureForToLowerAndToUpper.cs (1)
53operationContext.ReportDiagnostic(Diagnostic.Create(Rule, GetMethodNameLocation(operation.Syntax)));
Microsoft.NetCore.Analyzers\Runtime\SpecifyCultureInfo.cs (1)
73oaContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\SpecifyIFormatProvider.cs (4)
204oaContext.ReportDiagnostic( 237oaContext.ReportDiagnostic( 258oaContext.ReportDiagnostic(invocationExpression.CreateDiagnostic(IFormatProviderOptionalRule, 294oaContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\SpecifyStringComparison.cs (1)
202oaContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\TestForEmptyStringsUsingStringLength.cs (2)
57static (context, diagnostic) => context.ReportDiagnostic(diagnostic), 64static (context, diagnostic) => context.ReportDiagnostic(diagnostic),
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectly.cs (1)
62operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\UseAsyncMethodInAsyncContext.cs (2)
150context.ReportDiagnostic(diagnostic); 347context.ReportDiagnostic(diagnostic);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.cs (1)
58context.ReportDiagnostic(conditional.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\UseEnvironmentMembers.cs (3)
106context.ReportDiagnostic(initialPropRef.CreateDiagnostic(UseEnvironmentProcessIdRule)); 120context.ReportDiagnostic(initialPropRef.CreateDiagnostic(UseEnvironmentProcessPathRule)); 132context.ReportDiagnostic(initialPropRef.CreateDiagnostic(UseEnvironmentCurrentManagedThreadIdRule));
Microsoft.NetCore.Analyzers\Runtime\UseExceptionThrowHelpers.cs (4)
194context.ReportDiagnostic(condition.CreateDiagnostic( 211context.ReportDiagnostic(condition.CreateDiagnostic( 259context.ReportDiagnostic(condition.CreateDiagnostic( 304context.ReportDiagnostic(condition.CreateDiagnostic(
Microsoft.NetCore.Analyzers\Runtime\UseOrdinalStringComparison.cs (2)
61operationContext.ReportDiagnostic(Diagnostic.Create(Rule, GetMethodNameLocation(operation.Syntax))); 74operationContext.ReportDiagnostic(lastArgument.Syntax.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\UseRegexMembers.cs (2)
94context.ReportDiagnostic(initialPropRef.CreateDiagnostic(UseRegexIsMatchRuleId)); 112context.ReportDiagnostic(initialPropRef.CreateDiagnostic(UseRegexCountRuleId));
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.cs (1)
68context.ReportDiagnostic(binary.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.cs (1)
67context.ReportDiagnostic(context.Operation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Runtime\UseThreadStaticCorrectly.cs (1)
94context.ReportDiagnostic(fieldInit.CreateDiagnostic(ThreadStaticInitializedInlineRule));
Microsoft.NetCore.Analyzers\Security\ApprovedCipherModeAnalyzer.cs (1)
70operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInIFormatterSerializableObjectGraphAnalyzer.cs (1)
126operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInSerializableObjectGraphAnalyzer.cs (1)
295operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotAddSchemaByURL.cs (1)
61operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotAlwaysSkipTokenValidationInDelegates.cs (1)
128context.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotDisableCertificateValidation.cs (1)
116operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpHeaderChecking.cs (1)
65operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotDisableTokenValidationChecks.cs (1)
75context.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotSetSwitch.cs (2)
120operationAnalysisContext.ReportDiagnostic( 162operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseAccountSAS.cs (1)
59operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseCreateEncryptorWithNonDefaultIV.cs (1)
138operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseDeprecatedSecurityProtocols.cs (4)
94operationAnalysisContext.ReportDiagnostic( 101operationAnalysisContext.ReportDiagnostic( 173operationAnalysisContext.ReportDiagnostic( 181operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseDSA.cs (4)
85operationAnalysisContext.ReportDiagnostic( 106operationAnalysisContext.ReportDiagnostic( 137operationAnalysisContext.ReportDiagnostic( 153operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureCryptographicAlgorithms.cs (1)
150operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerMethodsBase.cs (2)
96operationAnalysisContext.ReportDiagnostic( 118operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureRandomness.cs (1)
56operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseObsoleteKDFAlgorithm.cs (1)
81operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFAlgorithm.cs (1)
89operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\DoNotUseXslTransform.cs (1)
57operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\JsonNetTypeNameHandling.cs (2)
61operationAnalysisContext.ReportDiagnostic( 90operationAnalysisContext.ReportDiagnostic(childOperation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Security\SetHttpOnlyForHttpCookie.cs (1)
105operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\SslProtocolsAnalyzer.cs (4)
84operationAnalysisContext.ReportDiagnostic( 91operationAnalysisContext.ReportDiagnostic( 198operationAnalysisContext.ReportDiagnostic( 206operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\UseContainerLevelAccessPolicy.cs (1)
168operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\UseRSAWithSufficientKeySize.cs (4)
94operationAnalysisContext.ReportDiagnostic( 121operationAnalysisContext.ReportDiagnostic( 136operationAnalysisContext.ReportDiagnostic( 163operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\UseSecureCookiesASPNetCore.cs (1)
134operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\UseSharedAccessProtocolHttpsOnly.cs (1)
159operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Security\UseXmlReaderBase.cs (1)
90operationAnalysisContext.ReportDiagnostic(
Microsoft.NetCore.Analyzers\Tasks\DoNotConfigureAwaitWithSuppressThrowing.cs (1)
67operationContext.ReportDiagnostic(arg.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Tasks\DoNotCreateTaskCompletionSourceWithWrongArguments.cs (1)
67operationContext.ReportDiagnostic(conversionOperation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Tasks\DoNotCreateTasksWithoutPassingATaskScheduler.cs (1)
71operationContext.ReportDiagnostic(invocation.CreateDiagnostic(Rule, invocation.TargetMethod.Name));
Microsoft.NetCore.Analyzers\Tasks\DoNotUseNonCancelableTaskDelayWithWhenAny.cs (1)
116context.ReportDiagnostic(operation.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Tasks\DoNotUseWhenAllOrWaitAllWithSingleArgument.cs (2)
69context.ReportDiagnostic(invocation.CreateDiagnostic(WhenAllRule)); 73context.ReportDiagnostic(invocation.CreateDiagnostic(WaitAllRule));
Microsoft.NetCore.Analyzers\Tasks\UseValueTasksCorrectly.cs (7)
128operationContext.ReportDiagnostic(invocation.CreateDiagnostic(AccessingIncompleteResultRule)); 139operationContext.ReportDiagnostic(invocation.CreateDiagnostic(AccessingIncompleteResultRule)); 183operationContext.ReportDiagnostic(invocation.CreateDiagnostic(UnconsumedRule)); 271operationContext.ReportDiagnostic(invocation.CreateDiagnostic(DoubleConsumptionRule)); 284operationContext.ReportDiagnostic(invocation.CreateDiagnostic(AccessingIncompleteResultRule)); 342operationContext.ReportDiagnostic(invocation.CreateDiagnostic(DoubleConsumptionRule)); 369operationContext.ReportDiagnostic(invocation.CreateDiagnostic(GeneralRule));
Microsoft.NetCore.Analyzers\Usage\DoNotCompareSpanToNull.cs (2)
66context.ReportDiagnostic(binaryOperation.CreateDiagnostic(DoNotCompareSpanToNullRule)); 72context.ReportDiagnostic(binaryOperation.CreateDiagnostic(DoNotCompareSpanToDefaultRule));
Microsoft.NetCore.Analyzers\Usage\DoNotPassNonNullableValueToArgumentNullExceptionThrowIfNull.cs (2)
69context.ReportDiagnostic(invocation.CreateDiagnostic(DoNotPassNonNullableValueDiagnostic)); 74context.ReportDiagnostic(invocation.CreateDiagnostic(DoNotPassNullableStructDiagnostic));
Microsoft.NetCore.Analyzers\Usage\PreferGenericOverloads.cs (1)
60context.ReportDiagnostic(invocationContext.Invocation.CreateDiagnostic(
Microsoft.NetCore.Analyzers\Usage\ProvideCorrectArgumentToEnumHasFlag.cs (1)
58context.ReportDiagnostic(invocation.CreateDiagnostic(DifferentTypeRule, GetArgumentTypeName(conversion), invocation.Instance.Type.Name));
Microsoft.NetCore.Analyzers\Usage\ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectly.cs (1)
82context.ReportDiagnostic(context.Operation.CreateDiagnostic(EnsureMaxResponseHeaderLengthRule, propertyValue));
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessing.cs (10)
265context.ReportDiagnostic(expressionSyntax.CreateDiagnostic(RuleDoNotUseDtdProcessingOverloads, method.Name)); 296context.ReportDiagnostic(diag); 392context.ReportDiagnostic(assign.Syntax.CreateDiagnostic(RuleXmlDocumentWithNoSecureResolver)); 414context.ReportDiagnostic(node.CreateDiagnostic(RuleXmlDocumentWithNoSecureResolver)); 480context.ReportDiagnostic(env.XmlTextReaderDefinition.CreateDiagnostic(RuleXmlTextReaderSetInsecureResolution)); 490context.ReportDiagnostic(env.XmlTextReaderDefinition.CreateDiagnostic(RuleXmlTextReaderConstructedWithNoSecureResolution)); 566context.ReportDiagnostic(context.Operation.Syntax.CreateDiagnostic(RuleXmlDocumentWithNoSecureResolver)); 609context.ReportDiagnostic(expression.Syntax.CreateDiagnostic(RuleXmlTextReaderSetInsecureResolution)); 692context.ReportDiagnostic(Diagnostic.Create(RuleDoNotUseSetInnerXml, location)); 696context.ReportDiagnostic(Diagnostic.Create(RuleReviewDtdProcessingProperties, location));
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessingInApiDesign.cs (1)
194context.ReportDiagnostic(
Microsoft.NetFramework.Analyzers\DoNotUseInsecureXSLTScriptExecution.cs (2)
83static (context, diagnostic) => context.ReportDiagnostic(diagnostic), 93static (context, diagnostic) => context.ReportDiagnostic(diagnostic),
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (2)
55context.ReportDiagnostic(context.ContainingSymbol.CreateDiagnostic(ComHostingDoesNotSupportGeneratedComInterface, context.ContainingSymbol.Name)); 63context.ReportDiagnostic(context.ContainingSymbol.CreateDiagnostic(ComHostingDoesNotSupportGeneratedComInterface, context.ContainingSymbol.Name));
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (4)
119context.ReportDiagnostic( 160context.ReportDiagnostic( 180context.ReportDiagnostic( 190context.ReportDiagnostic(
Microsoft.Interop.LibraryImportGenerator (7)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (5)
652DiagnosticReporter managedTypeReporter = DiagnosticReporter.CreateForLocation(managedTypeArgument.Value.Syntax.GetLocation(), context.ReportDiagnostic); 657DiagnosticReporter managedTypeReporter = DiagnosticReporter.CreateForLocation(((TypeOfExpressionSyntax)managedTypeOfOp.Syntax).Type.GetLocation(), context.ReportDiagnostic); 673DiagnosticReporter marshallerTypeReporter = DiagnosticReporter.CreateForLocation(marshallerTypeArgument.Value.Syntax.GetLocation(), context.ReportDiagnostic); 678DiagnosticReporter marshallerTypeReporter = DiagnosticReporter.CreateForLocation(((TypeOfExpressionSyntax)marshallerTypeOfOp.Syntax).Type.GetLocation(), context.ReportDiagnostic); 692DiagnosticReporter marshalModeReporter = DiagnosticReporter.CreateForLocation(marshalModeArgument.Syntax.GetLocation(), context.ReportDiagnostic);
Analyzers\NativeMarshallingAttributeAnalyzer.cs (2)
93DiagnosticReporter diagnosticFactory = DiagnosticReporter.CreateForLocation(marshallerEntryPointTypeArgument.Value.Syntax.GetLocation(), context.ReportDiagnostic); 102DiagnosticReporter.CreateForLocation(((TypeOfExpressionSyntax)typeOfOp.Syntax).Type.GetLocation(), context.ReportDiagnostic),
Roslyn.Diagnostics.Analyzers (9)
DoNotCallGetTestAccessor.cs (4)
57context.ReportDiagnostic(memberReference.Syntax.CreateDiagnostic(DoNotCallGetTestAccessorRule)); 67context.ReportDiagnostic(invocation.Syntax.CreateDiagnostic(DoNotCallGetTestAccessorRule)); 72context.ReportDiagnostic(invocation.Syntax.CreateDiagnostic(DoNotCallGetTestAccessorRule)); 82context.ReportDiagnostic(objectCreation.Syntax.CreateDiagnostic(DoNotCallGetTestAccessorRule));
ImmutableArrayBoxingAnalyzer.cs (1)
96context.ReportDiagnostic(instance.CreateDiagnostic(Rule, $"{typeName}.{targetMethod.Name}"));
PooledArrayBuilderAsRefAnalyzer.cs (2)
67context.ReportDiagnostic(invocation.CreateDiagnostic(Rule)); 74context.ReportDiagnostic(invocation.CreateDiagnostic(Rule));
TemporaryArrayAsRefAnalyzer.cs (2)
65context.ReportDiagnostic(invocation.CreateDiagnostic(Rule)); 72context.ReportDiagnostic(invocation.CreateDiagnostic(Rule));
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpDoNotCapturePrimaryContructorParameters.cs (1)
60context.ReportDiagnostic(Diagnostic.Create(Rule, operation.Syntax.GetLocation(), operation.Parameter.Name));
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (1)
70context.ReportDiagnostic(invocation.CreateDiagnostic(Rule));
PreferNullLiteral.cs (1)
78context.ReportDiagnostic(context.Operation.CreateDiagnostic(Rule));
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.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexAnalyzer.cs (1)
80context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.UseRegexSourceGeneration, location));