290 references to IDEDiagnosticIds
Microsoft.CodeAnalysis.CodeStyle (63)
AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
19
: base(
IDEDiagnosticIds
.AddAccessibilityModifiersDiagnosticId,
AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
71
: base(
IDEDiagnosticIds
.AddRequiredParenthesesDiagnosticId,
AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
21
: base(
IDEDiagnosticIds
.ConsecutiveStatementPlacementDiagnosticId,
AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
14
: base(diagnosticId:
IDEDiagnosticIds
.ConvertTypeOfToNameOfDiagnosticId,
AbstractFileHeaderDiagnosticAnalyzer.cs (1)
24
=> CreateDescriptorWithId(
IDEDiagnosticIds
.FileHeaderMismatch, EnforceOnBuildValues.FileHeaderMismatch, title, message);
AbstractForEachCastDiagnosticAnalyzer.cs (1)
31
diagnosticId:
IDEDiagnosticIds
.ForEachCastDiagnosticId,
AbstractFormattingAnalyzer.cs (1)
17
IDEDiagnosticIds
.FormattingDiagnosticId,
AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
25
IDEDiagnosticIds
.MakeFieldReadonlyDiagnosticId,
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
35
: base(
IDEDiagnosticIds
.MatchFolderAndNamespaceDiagnosticId,
AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.MultipleBlankLinesDiagnosticId,
AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
23
: base(
IDEDiagnosticIds
.OrderModifiersDiagnosticId,
AbstractPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
16
: base(
IDEDiagnosticIds
.PopulateSwitchExpressionDiagnosticId,
AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
16
: base(
IDEDiagnosticIds
.PopulateSwitchStatementDiagnosticId,
AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
25
: base(
IDEDiagnosticIds
.AddThisOrMeQualificationDiagnosticId,
AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
19
: base(
IDEDiagnosticIds
.RemoveRedundantEqualityDiagnosticId,
AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
28
IDEDiagnosticIds
.InvalidSuppressMessageAttributeDiagnosticId,
32
IDEDiagnosticIds
.InvalidSuppressMessageAttributeDiagnosticId,
41
IDEDiagnosticIds
.LegacyFormatSuppressMessageAttributeDiagnosticId,
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
21
: base(
IDEDiagnosticIds
.RemoveUnnecessaryCastDiagnosticId,
AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (2)
40
classificationIdDescriptor = CreateDescriptorWithId(
IDEDiagnosticIds
.RemoveUnnecessaryImportsDiagnosticId, EnforceOnBuildValues.RemoveUnnecessaryImports, titleAndMessage, isUnnecessary: true);
41
generatedCodeClassificationIdDescriptor = CreateDescriptorWithId(
IDEDiagnosticIds
.RemoveUnnecessaryImportsDiagnosticId + "_gen", EnforceOnBuild.Never, titleAndMessage, isUnnecessary: true, isConfigurable: false);
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
25
: base(
IDEDiagnosticIds
.RemoveUnnecessaryParenthesesDiagnosticId,
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (5)
31
IDEDiagnosticIds
.RemoveUnnecessarySuppressionDiagnosticId,
102
compilationWithAnalyzers.Compilation.Options.SyntaxTreeOptionsProvider.TryGetDiagnosticValue(tree,
IDEDiagnosticIds
.RemoveUnnecessarySuppressionDiagnosticId, cancellationToken, out var severity) ||
103
compilationWithAnalyzers.Compilation.Options.SpecificDiagnosticOptions.TryGetValue(
IDEDiagnosticIds
.RemoveUnnecessarySuppressionDiagnosticId, out severity))
330
case
IDEDiagnosticIds
.RemoveUnnecessarySuppressionDiagnosticId:
335
case
IDEDiagnosticIds
.FormattingDiagnosticId:
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
36
IDEDiagnosticIds
.RemoveUnusedMembersDiagnosticId,
45
IDEDiagnosticIds
.RemoveUnreadMembersDiagnosticId,
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (3)
66
IDEDiagnosticIds
.ExpressionValueIsUnusedDiagnosticId,
74
IDEDiagnosticIds
.ValueAssignedIsUnusedDiagnosticId,
83
IDEDiagnosticIds
.UnusedParameterDiagnosticId,
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
42
: base(
IDEDiagnosticIds
.SimplifyConditionalExpressionDiagnosticId,
AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
21
: base(
IDEDiagnosticIds
.SimplifyInterpolationId,
AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
34
: base(
IDEDiagnosticIds
.SimplifyLinqExpressionDiagnosticId,
AbstractUseAutoPropertyAnalyzer.cs (1)
49
: base(
IDEDiagnosticIds
.UseAutoPropertyDiagnosticId,
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
31
: base(
IDEDiagnosticIds
.UseCoalesceExpressionForIfNullCheckDiagnosticId,
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
31
: base(
IDEDiagnosticIds
.UseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticId,
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
26
: base(
IDEDiagnosticIds
.UseCoalesceExpressionForTernaryConditionalCheckDiagnosticId,
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
39
IDEDiagnosticIds
.UseCollectionInitializerDiagnosticId,
46
IDEDiagnosticIds
.UseCollectionInitializerDiagnosticId,
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
36
: base(
IDEDiagnosticIds
.UseCompoundAssignmentDiagnosticId,
48
IDEDiagnosticIds
.UseCompoundAssignmentDiagnosticId,
55
IDEDiagnosticIds
.UseCompoundAssignmentDiagnosticId,
AbstractUseConditionalExpressionForAssignmentDiagnosticAnalyzer.cs (1)
18
: base(
IDEDiagnosticIds
.UseConditionalExpressionForAssignmentDiagnosticId,
AbstractUseConditionalExpressionForReturnDiagnosticAnalyzer.cs (1)
18
: base(
IDEDiagnosticIds
.UseConditionalExpressionForReturnDiagnosticId,
AbstractUseInferredMemberNameDiagnosticAnalyzer.cs (1)
18
: base(
IDEDiagnosticIds
.UseInferredMemberNameDiagnosticId,
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.UseIsNullCheckDiagnosticId,
AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
56
: base(
IDEDiagnosticIds
.UseNullPropagationDiagnosticId,
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (2)
34
IDEDiagnosticIds
.UseObjectInitializerDiagnosticId,
41
IDEDiagnosticIds
.UseObjectInitializerDiagnosticId,
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
40
: base(
IDEDiagnosticIds
.UseThrowExpressionDiagnosticId,
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
19
private const string DiagnosticID =
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID;
IDEDiagnosticIdToOptionMappingHelper.cs (1)
17
/// Helper type to map <see cref="
IDEDiagnosticIds
"/> to an unique editorconfig code style option, if any,
NamingStyleDiagnosticAnalyzerBase.cs (1)
26
: base(
IDEDiagnosticIds
.NamingRuleId,
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (6)
45
private static readonly DiagnosticDescriptor s_descriptorSimplifyNames = CreateDescriptorWithId(
IDEDiagnosticIds
.SimplifyNamesDiagnosticId,
52
private static readonly DiagnosticDescriptor s_descriptorSimplifyMemberAccess = CreateDescriptorWithId(
IDEDiagnosticIds
.SimplifyMemberAccessDiagnosticId,
58
private static readonly DiagnosticDescriptor s_descriptorPreferBuiltinOrFrameworkType = CreateDescriptorWithId(
IDEDiagnosticIds
.PreferBuiltInOrFrameworkTypeDiagnosticId,
140
case
IDEDiagnosticIds
.SimplifyNamesDiagnosticId:
145
case
IDEDiagnosticIds
.SimplifyMemberAccessDiagnosticId:
150
case
IDEDiagnosticIds
.PreferBuiltInOrFrameworkTypeDiagnosticId:
UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.UseExplicitTupleNameDiagnosticId,
UseSystemHashCodeDiagnosticAnalyzer.cs (1)
17
: base(
IDEDiagnosticIds
.UseSystemHashCode,
Microsoft.CodeAnalysis.CodeStyle.Fixes (42)
AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
24
=> ImmutableArray.Create(
IDEDiagnosticIds
.AddAccessibilityModifiersDiagnosticId);
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
23
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(
IDEDiagnosticIds
.MatchFolderAndNamespaceDiagnosticId);
AbstractConvertTypeOfToNameOfCodeFixProvider.cs (1)
25
=> ImmutableArray.Create(
IDEDiagnosticIds
.ConvertTypeOfToNameOfDiagnosticId);
AbstractFileHeaderCodeFixProvider.cs (1)
29
= ImmutableArray.Create(
IDEDiagnosticIds
.FileHeaderMismatch);
AbstractForEachCastCodeFixProvider.cs (1)
28
=> ImmutableArray.Create(
IDEDiagnosticIds
.ForEachCastDiagnosticId);
AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
27
=> ImmutableArray.Create(
IDEDiagnosticIds
.MakeFieldReadonlyDiagnosticId);
AbstractMultipleBlankLinesCodeFixProvider.cs (1)
31
=> ImmutableArray.Create(
IDEDiagnosticIds
.MultipleBlankLinesDiagnosticId);
AbstractOrderModifiersCodeFixProvider.cs (1)
39
=> FixableCompilerErrorIds.Add(
IDEDiagnosticIds
.OrderModifiersDiagnosticId);
AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
25
: base(
IDEDiagnosticIds
.PopulateSwitchExpressionDiagnosticId)
AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
26
: base(
IDEDiagnosticIds
.PopulateSwitchStatementDiagnosticId)
AbstractQualifyMemberAccessCodeFixProvider.cs (1)
26
=> ImmutableArray.Create(
IDEDiagnosticIds
.AddThisOrMeQualificationDiagnosticId);
AbstractRemoveUnnecessaryParenthesesCodeFixProvider.cs (1)
23
=> ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessaryParenthesesDiagnosticId);
AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
26
=> ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnusedMembersDiagnosticId);
AbstractRemoveUnusedValuesCodeFixProvider.cs (5)
64
=> ImmutableArray.Create(
IDEDiagnosticIds
.ExpressionValueIsUnusedDiagnosticId,
65
IDEDiagnosticIds
.ValueAssignedIsUnusedDiagnosticId);
219
=> diagnosticId ==
IDEDiagnosticIds
.ValueAssignedIsUnusedDiagnosticId;
348
case
IDEDiagnosticIds
.ExpressionValueIsUnusedDiagnosticId:
355
case
IDEDiagnosticIds
.ValueAssignedIsUnusedDiagnosticId:
AbstractSimplifyInterpolationCodeFixProvider.cs (1)
34
ImmutableArray.Create(
IDEDiagnosticIds
.SimplifyInterpolationId);
AbstractSimplifyLinqExpressionCodeFixProvider`3.cs (1)
26
=> ImmutableArray.Create(
IDEDiagnosticIds
.SimplifyLinqExpressionDiagnosticId);
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
42
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseCollectionInitializerDiagnosticId);
AbstractUseCompoundAssignmentCodeFixProvider.cs (1)
26
ImmutableArray.Create(
IDEDiagnosticIds
.UseCompoundAssignmentDiagnosticId);
AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
44
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseConditionalExpressionForAssignmentDiagnosticId);
AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseConditionalExpressionForReturnDiagnosticId);
AbstractUseInferredMemberNameCodeFixProvider.cs (1)
23
= ImmutableArray.Create(
IDEDiagnosticIds
.UseInferredMemberNameDiagnosticId);
AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (1)
25
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseIsNullCheckDiagnosticId);
AbstractUseNullPropagationCodeFixProvider.cs (1)
57
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseNullPropagationDiagnosticId);
AbstractUseObjectInitializerCodeFixProvider.cs (1)
40
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseObjectInitializerDiagnosticId);
AddRequiredParenthesesCodeFixProvider.cs (1)
29
=> ImmutableArray.Create(
IDEDiagnosticIds
.AddRequiredParenthesesDiagnosticId);
ConsecutiveStatementPlacementCodeFixProvider.cs (1)
31
=> ImmutableArray.Create(
IDEDiagnosticIds
.ConsecutiveStatementPlacementDiagnosticId);
FormattingCodeFixProvider.cs (1)
22
=> ImmutableArray.Create(
IDEDiagnosticIds
.FormattingDiagnosticId);
NamingStyleCodeFixProvider.cs (1)
41
= ImmutableArray.Create(
IDEDiagnosticIds
.NamingRuleId);
RemoveRedundantEqualityCodeFixProvider.cs (1)
31
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(
IDEDiagnosticIds
.RemoveRedundantEqualityDiagnosticId);
RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
29
=> ImmutableArray.Create(
IDEDiagnosticIds
.InvalidSuppressMessageAttributeDiagnosticId);
RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessarySuppressionDiagnosticId);
SimplifyConditionalCodeFixProvider.cs (1)
33
ImmutableArray.Create(
IDEDiagnosticIds
.SimplifyConditionalExpressionDiagnosticId);
UpdateLegacySuppressionsCodeFixProvider.cs (1)
30
=> ImmutableArray.Create(
IDEDiagnosticIds
.LegacyFormatSuppressMessageAttributeDiagnosticId);
UseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
32
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseCoalesceExpressionForIfNullCheckDiagnosticId);
UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
30
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticId);
UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
31
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseCoalesceExpressionForTernaryConditionalCheckDiagnosticId);
UseExplicitTupleNameCodeFixProvider.cs (1)
30
= ImmutableArray.Create(
IDEDiagnosticIds
.UseExplicitTupleNameDiagnosticId);
UseSystemHashCodeCodeFixProvider.cs (1)
31
= ImmutableArray.Create(
IDEDiagnosticIds
.UseSystemHashCode);
Microsoft.CodeAnalysis.CSharp.CodeStyle (56)
ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
19
: base(
IDEDiagnosticIds
.ArrowExpressionClausePlacementDiagnosticId,
ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.ConditionalExpressionPlacementDiagnosticId,
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.ConsecutiveBracePlacementDiagnosticId,
ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
21
: base(
IDEDiagnosticIds
.ConstructorInitializerPlacementDiagnosticId,
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
24
: base(
IDEDiagnosticIds
.ConvertSwitchStatementToExpressionDiagnosticId,
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
19
: base(
IDEDiagnosticIds
.UseBlockScopedNamespaceDiagnosticId,
ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
19
: base(
IDEDiagnosticIds
.UseFileScopedNamespaceDiagnosticId,
ConvertToProgramMainDiagnosticAnalyzer.cs (1)
21
IDEDiagnosticIds
.UseProgramMainId,
ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
23
IDEDiagnosticIds
.UseTopLevelStatementsId,
CSharpAddBracesDiagnosticAnalyzer.cs (1)
24
: base(
IDEDiagnosticIds
.AddBracesDiagnosticId,
CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
30
: base(
IDEDiagnosticIds
.UsePatternMatchingAsAndMemberAccessDiagnosticId,
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
34
: base(
IDEDiagnosticIds
.InlineAsTypeCheckId,
CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
38
: base(
IDEDiagnosticIds
.InlineDeclarationDiagnosticId,
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
38
: base(
IDEDiagnosticIds
.InlineIsTypeCheckId,
CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
18
IDEDiagnosticIds
.MakeStructFieldsWritable,
CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
22
: base(
IDEDiagnosticIds
.MakeStructMemberReadOnlyDiagnosticId,
CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.MakeStructReadOnlyDiagnosticId,
CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
17
: base(
IDEDiagnosticIds
.RemoveConfusingSuppressionForIsExpressionDiagnosticId,
CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
24
IDEDiagnosticIds
.RemoveRedundantNullableDirectiveDiagnosticId,
CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
22
: base(
IDEDiagnosticIds
.RemoveUnnecessaryDiscardDesignationDiagnosticId,
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
32
: base(
IDEDiagnosticIds
.RemoveUnnecessaryLambdaExpressionDiagnosticId,
CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
27
: base(
IDEDiagnosticIds
.RemoveUnnecessaryNullableDirectiveDiagnosticId,
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
25
: base(
IDEDiagnosticIds
.RemoveUnreachableCodeDiagnosticId,
CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
27
: base(
IDEDiagnosticIds
.SimplifyPropertyPatternDiagnosticId,
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
32
: base(
IDEDiagnosticIds
.UseCoalesceCompoundAssignmentDiagnosticId,
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
25
: base(
IDEDiagnosticIds
.UseDeconstructionDiagnosticId,
CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
19
: base(
IDEDiagnosticIds
.UseDefaultLiteralDiagnosticId,
CSharpUseExplicitTypeDiagnosticAnalyzer.cs (1)
22
: base(diagnosticId:
IDEDiagnosticIds
.UseExplicitTypeDiagnosticId,
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
23
: base(
IDEDiagnosticIds
.UseImplicitObjectCreationDiagnosticId,
CSharpUseImplicitTypeDiagnosticAnalyzer.cs (1)
22
: base(diagnosticId:
IDEDiagnosticIds
.UseImplicitTypeDiagnosticId,
CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
47
: base(
IDEDiagnosticIds
.UseIndexOperatorDiagnosticId,
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
24
: base(
IDEDiagnosticIds
.UseIsNullCheckDiagnosticId,
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
45
: base(
IDEDiagnosticIds
.UseLocalFunctionDiagnosticId,
CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
32
: base(
IDEDiagnosticIds
.UseNameofInAttributeDiagnosticId,
CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
29
: base(
IDEDiagnosticIds
.UseNotPatternDiagnosticId,
CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.UseNullCheckOverTypeCheckDiagnosticId,
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
30
IDEDiagnosticIds
.UsePatternCombinatorsDiagnosticId,
35
: base(
IDEDiagnosticIds
.UsePatternCombinatorsDiagnosticId,
CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
45
: base(
IDEDiagnosticIds
.UseRangeOperatorDiagnosticId,
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
36
: base(
IDEDiagnosticIds
.UseTupleSwapDiagnosticId,
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
20
: base(
IDEDiagnosticIds
.EmbeddedStatementPlacementDiagnosticId,
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
29
: base(
IDEDiagnosticIds
.InvokeDelegateWithConditionalAccessId,
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
18
: base(
IDEDiagnosticIds
.MakeLocalFunctionStaticDiagnosticId,
MisplacedUsingDirectivesDiagnosticAnalyzer.cs (2)
28
IDEDiagnosticIds
.MoveMisplacedUsingDirectivesDiagnosticId,
36
IDEDiagnosticIds
.MoveMisplacedUsingDirectivesDiagnosticId,
UseExpressionBodyForAccessorsHelper.cs (1)
20
: base(
IDEDiagnosticIds
.UseExpressionBodyForAccessorsDiagnosticId,
UseExpressionBodyForConstructorsHelper.cs (1)
20
: base(
IDEDiagnosticIds
.UseExpressionBodyForConstructorsDiagnosticId,
UseExpressionBodyForConversionOperatorsHelper.cs (1)
20
: base(
IDEDiagnosticIds
.UseExpressionBodyForConversionOperatorsDiagnosticId,
UseExpressionBodyForIndexersHelper.cs (1)
23
: base(
IDEDiagnosticIds
.UseExpressionBodyForIndexersDiagnosticId,
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
105
return CreateDescriptorWithId(
IDEDiagnosticIds
.UseExpressionBodyForLambdaExpressionsDiagnosticId, EnforceOnBuildValues.UseExpressionBodyForLambdaExpressions, title, message);
UseExpressionBodyForLocalFunctionHelper.cs (1)
23
: base(
IDEDiagnosticIds
.UseExpressionBodyForLocalFunctionsDiagnosticId,
UseExpressionBodyForMethodsHelper.cs (1)
23
: base(
IDEDiagnosticIds
.UseExpressionBodyForMethodsDiagnosticId,
UseExpressionBodyForOperatorsHelper.cs (1)
22
: base(
IDEDiagnosticIds
.UseExpressionBodyForOperatorsDiagnosticId,
UseExpressionBodyForPropertiesHelper.cs (1)
23
: base(
IDEDiagnosticIds
.UseExpressionBodyForPropertiesDiagnosticId,
UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
54
: base(
IDEDiagnosticIds
.UseSimpleUsingStatementDiagnosticId,
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
36
: base(
IDEDiagnosticIds
.UseUtf8StringLiteralDiagnosticId,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (49)
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.ArrowExpressionClausePlacementDiagnosticId);
ConditionalExpressionPlacementCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.ConditionalExpressionPlacementDiagnosticId);
ConsecutiveBracePlacementCodeFixProvider.cs (1)
33
=> ImmutableArray.Create(
IDEDiagnosticIds
.ConsecutiveBracePlacementDiagnosticId);
ConstructorInitializerPlacementCodeFixProvider.cs (1)
32
=> ImmutableArray.Create(
IDEDiagnosticIds
.ConstructorInitializerPlacementDiagnosticId);
ConvertNamespaceCodeFixProvider.cs (4)
38
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseBlockScopedNamespaceDiagnosticId,
IDEDiagnosticIds
.UseFileScopedNamespaceDiagnosticId);
47
IDEDiagnosticIds
.UseBlockScopedNamespaceDiagnosticId => NamespaceDeclarationPreference.BlockScoped,
48
IDEDiagnosticIds
.UseFileScopedNamespaceDiagnosticId => NamespaceDeclarationPreference.FileScoped,
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
39
=> ImmutableArray.Create(
IDEDiagnosticIds
.ConvertSwitchStatementToExpressionDiagnosticId);
CSharpAddBracesCodeFixProvider.cs (1)
28
=> ImmutableArray.Create(
IDEDiagnosticIds
.AddBracesDiagnosticId);
CSharpAsAndMemberAccessCodeFixProvider.cs (1)
35
=> ImmutableArray.Create(
IDEDiagnosticIds
.UsePatternMatchingAsAndMemberAccessDiagnosticId);
CSharpAsAndNullCheckCodeFixProvider.cs (1)
32
=> ImmutableArray.Create(
IDEDiagnosticIds
.InlineAsTypeCheckId);
CSharpInlineDeclarationCodeFixProvider.cs (1)
42
=> ImmutableArray.Create(
IDEDiagnosticIds
.InlineDeclarationDiagnosticId);
CSharpIsAndCastCheckCodeFixProvider.cs (1)
36
=> ImmutableArray.Create(
IDEDiagnosticIds
.InlineIsTypeCheckId);
CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
31
=> ImmutableArray.Create(
IDEDiagnosticIds
.MakeStructFieldsWritable);
CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
32
ImmutableArray.Create(
IDEDiagnosticIds
.MakeStructMemberReadOnlyDiagnosticId);
CSharpMakeStructReadOnlyCodeFixProvider.cs (1)
30
ImmutableArray.Create(
IDEDiagnosticIds
.MakeStructReadOnlyDiagnosticId);
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
36
=> ImmutableArray.Create(
IDEDiagnosticIds
.RemoveConfusingSuppressionForIsExpressionDiagnosticId);
CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
37
ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessaryCastDiagnosticId);
CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessaryDiscardDesignationDiagnosticId);
CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
35
=> ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessaryLambdaExpressionDiagnosticId);
CSharpRemoveUnnecessaryNullableDirectiveCodeFixProvider.cs (3)
32
IDEDiagnosticIds
.RemoveRedundantNullableDirectiveDiagnosticId,
33
IDEDiagnosticIds
.RemoveUnnecessaryNullableDirectiveDiagnosticId);
39
if (diagnostic.Id ==
IDEDiagnosticIds
.RemoveRedundantNullableDirectiveDiagnosticId)
CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
31
ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnreachableCodeDiagnosticId);
CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
35
ImmutableArray.Create(
IDEDiagnosticIds
.SimplifyPropertyPatternDiagnosticId);
CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
36
ImmutableArray.Create(
IDEDiagnosticIds
.UseCoalesceCompoundAssignmentDiagnosticId);
CSharpUseDeconstructionCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseDeconstructionDiagnosticId);
CSharpUseDefaultLiteralCodeFixProvider.cs (1)
31
= ImmutableArray.Create(
IDEDiagnosticIds
.UseDefaultLiteralDiagnosticId);
CSharpUseImplicitObjectCreationCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseImplicitObjectCreationDiagnosticId);
CSharpUseIndexOperatorCodeFixProvider.cs (1)
35
ImmutableArray.Create(
IDEDiagnosticIds
.UseIndexOperatorDiagnosticId);
CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
36
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseIsNullCheckDiagnosticId);
CSharpUseLocalFunctionCodeFixProvider.cs (1)
43
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseLocalFunctionDiagnosticId);
CSharpUseNameofInAttributeCodeFixProvider.cs (1)
30
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
IDEDiagnosticIds
.UseNameofInAttributeDiagnosticId);
CSharpUseNotPatternCodeFixProvider.cs (1)
31
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseNotPatternDiagnosticId);
CSharpUseNullCheckOverTypeCheckCodeFixProvider.cs (1)
36
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseNullCheckOverTypeCheckDiagnosticId);
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
55
=> ImmutableArray.Create(
IDEDiagnosticIds
.UsePatternCombinatorsDiagnosticId);
CSharpUseRangeOperatorCodeFixProvider.cs (1)
41
ImmutableArray.Create(
IDEDiagnosticIds
.UseRangeOperatorDiagnosticId);
CSharpUseTupleSwapCodeFixProvider.cs (1)
36
= ImmutableArray.Create(
IDEDiagnosticIds
.UseTupleSwapDiagnosticId);
EmbeddedStatementPlacementCodeFixProvider.cs (1)
33
=> ImmutableArray.Create(
IDEDiagnosticIds
.EmbeddedStatementPlacementDiagnosticId);
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
34
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
IDEDiagnosticIds
.InvokeDelegateWithConditionalAccessId);
MakeLocalFunctionStaticCodeFixProvider.cs (1)
29
ImmutableArray.Create(
IDEDiagnosticIds
.MakeLocalFunctionStaticDiagnosticId);
MisplacedUsingDirectivesCodeFixProvider.cs (1)
49
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(
IDEDiagnosticIds
.MoveMisplacedUsingDirectivesDiagnosticId);
UseExplicitTypeCodeFixProvider.cs (1)
35
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseExplicitTypeDiagnosticId);
UseExpressionBodyForLambdaCodeFixProvider.cs (1)
33
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
IDEDiagnosticIds
.UseExpressionBodyForLambdaExpressionsDiagnosticId);
UseImplicitTypeCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseImplicitTypeDiagnosticId);
UseSimpleUsingStatementCodeFixProvider.cs (1)
41
ImmutableArray.Create(
IDEDiagnosticIds
.UseSimpleUsingStatementDiagnosticId);
UseThrowExpressionCodeFixProvider.cs (1)
34
=> ImmutableArray.Create(
IDEDiagnosticIds
.UseThrowExpressionDiagnosticId);
UseUtf8StringLiteralCodeFixProvider.cs (1)
37
ImmutableArray.Create(
IDEDiagnosticIds
.UseUtf8StringLiteralDiagnosticId);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (61)
ConvertSwitchStatementToExpressionTests.cs (1)
888
var descriptor = analyzer.SupportedDiagnostics.First(descriptor => descriptor.Id ==
IDEDiagnosticIds
.ConvertSwitchStatementToExpressionDiagnosticId);
CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
662
Assert.Equal(
IDEDiagnosticIds
.InlineIsTypeCheckId, diag.Id);
RemoveUnnecessaryExpressionParenthesesTests.cs (1)
51
=> TestHelpers.Diagnostic(
IDEDiagnosticIds
.RemoveUnnecessaryParenthesesDiagnosticId, text, startLocation: new LinePosition(line, column));
RemoveUnusedParametersTests.cs (26)
77
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
110
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
144
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
161
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
186
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
228
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
309
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
328
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
406
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
428
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
492
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
758
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
773
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
866
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1222
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId, "p1").WithLocation(5, 15),
1223
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId, "p2").WithLocation(5, 23),
1224
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId, "p3").WithLocation(13, 23),
1225
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId, "p4").WithLocation(13, 31),
1226
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId, "p5").WithLocation(19, 17));
1301
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1343
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1399
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1431
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1712
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1731
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
1753
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId));
UseExplicitTypeTests.cs (4)
2367
diagnosticId:
IDEDiagnosticIds
.UseExplicitTypeDiagnosticId,
2387
diagnosticId:
IDEDiagnosticIds
.UseExplicitTypeDiagnosticId,
2407
diagnosticId:
IDEDiagnosticIds
.UseExplicitTypeDiagnosticId,
2427
diagnosticId:
IDEDiagnosticIds
.UseExplicitTypeDiagnosticId,
UseImplicitTypeTests.cs (4)
1895
diagnosticId:
IDEDiagnosticIds
.UseImplicitTypeDiagnosticId,
1915
diagnosticId:
IDEDiagnosticIds
.UseImplicitTypeDiagnosticId,
1935
diagnosticId:
IDEDiagnosticIds
.UseImplicitTypeDiagnosticId,
1955
diagnosticId:
IDEDiagnosticIds
.UseImplicitTypeDiagnosticId,
ValidateFormatStringTests.cs (24)
638
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
696
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
714
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
732
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
751
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
770
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
789
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
809
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
829
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
847
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
865
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
883
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
901
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
920
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
939
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
958
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
985
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1004
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1023
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1042
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1061
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1080
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1099
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
1118
diagnosticId:
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
VisualBasicRemoveUnnecessaryByValDiagnosticAnalyzer.vb (1)
16
diagnosticId:=
IDEDiagnosticIds
.RemoveUnnecessaryByValDiagnosticId,
VisualBasicSimplifyObjectCreationDiagnosticAnalyzer.vb (1)
17
diagnosticId:=
IDEDiagnosticIds
.SimplifyObjectCreationDiagnosticId,
VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
27
MyBase.New(
IDEDiagnosticIds
.UseIsNotExpressionDiagnosticId,
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
27
ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessaryByValDiagnosticId)
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
31
ImmutableArray.Create(
IDEDiagnosticIds
.RemoveUnnecessaryCastDiagnosticId)
VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
25
Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
IDEDiagnosticIds
.SimplifyObjectCreationDiagnosticId)
VisualBasicUseIsNotExpressionCodeFixProvider.vb (1)
26
Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
IDEDiagnosticIds
.UseIsNotExpressionDiagnosticId)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (12)
RemoveUnnecessaryImportsTests.vb (2)
1065
diagnosticId:=
IDEDiagnosticIds
.RemoveUnnecessaryImportsDiagnosticId)
1077
diagnosticId:=
IDEDiagnosticIds
.RemoveUnnecessaryImportsDiagnosticId)
RemoveUnnecessaryParenthesesTests.vb (1)
30
Return TestHelpers.Diagnostic(
IDEDiagnosticIds
.RemoveUnnecessaryParenthesesDiagnosticId, text, startLocation:=New LinePosition(line, column))
RemoveUnusedParametersTests.vb (4)
44
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId))
55
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId))
67
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId))
177
Diagnostic(
IDEDiagnosticIds
.UnusedParameterDiagnosticId))
ValidateFormatStringTests.vb (5)
82
diagnosticId:=
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
96
diagnosticId:=
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
112
diagnosticId:=
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
136
diagnosticId:=
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,
306
diagnosticId:=
IDEDiagnosticIds
.ValidateFormatStringDiagnosticID,