399 types derived from DiagnosticAnalyzer
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.cs (1)
16public partial class AppHostAnalyzer : DiagnosticAnalyzer
GenerateDocumentationAndConfigFiles (1)
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
ILLink.RoslynAnalyzer (3)
COMAnalyzer.cs (1)
16public sealed class COMAnalyzer : DiagnosticAnalyzer
DynamicallyAccessedMembersAnalyzer.cs (1)
19public sealed class DynamicallyAccessedMembersAnalyzer : DiagnosticAnalyzer
RequiresAnalyzerBase.cs (1)
21public abstract class RequiresAnalyzerBase : DiagnosticAnalyzer
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Microsoft.Analyzers.Extra (7)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
14public sealed class AsyncCallInsideUsingBlockAnalyzer : DiagnosticAnalyzer
AsyncMethodWithoutCancellation.cs (1)
14public sealed class AsyncMethodWithoutCancellation : DiagnosticAnalyzer
CallAnalysis\CallAnalyzer.cs (1)
14public sealed partial class CallAnalyzer : DiagnosticAnalyzer
CoalesceAnalyzer.cs (1)
16public sealed class CoalesceAnalyzer : DiagnosticAnalyzer
ConditionalAccessAnalyzer.cs (1)
16public sealed class ConditionalAccessAnalyzer : DiagnosticAnalyzer
MakeExeTypesInternalAnalyzer.cs (1)
16public sealed class MakeExeTypesInternalAnalyzer : DiagnosticAnalyzer
UsingToStringInLoggersAnalyzer.cs (1)
15public sealed class UsingToStringInLoggersAnalyzer : DiagnosticAnalyzer
Microsoft.Analyzers.Local (3)
ApiLifecycle\ApiLifecycleAnalyzer.cs (1)
16public sealed class ApiLifecycleAnalyzer : DiagnosticAnalyzer
CallAnalysis\CallAnalyzer.cs (1)
14public sealed partial class CallAnalyzer : DiagnosticAnalyzer
InternalReferencedInPublicDocAnalyzer.cs (1)
19public class InternalReferencedInPublicDocAnalyzer : DiagnosticAnalyzer
Microsoft.AspNetCore.Analyzers (3)
StartupAnalyzer.cs (1)
13public partial class StartupAnalyzer : DiagnosticAnalyzer
StartupAnalyzer.Diagnostics.cs (1)
10public partial class StartupAnalyzer : DiagnosticAnalyzer
StartupAnalyzer.Events.cs (1)
11public partial class StartupAnalyzer : DiagnosticAnalyzer
Microsoft.AspNetCore.App.Analyzers (18)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
17public sealed class AddAuthorizationBuilderAnalyzer : DiagnosticAnalyzer
Http\HeaderDictionaryAddAnalyzer.cs (1)
15public sealed class HeaderDictionaryAddAnalyzer : DiagnosticAnalyzer
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
14public partial class HeaderDictionaryIndexerAnalyzer : DiagnosticAnalyzer
Http\RequestDelegateReturnTypeAnalyzer.cs (1)
15public partial class RequestDelegateReturnTypeAnalyzer : DiagnosticAnalyzer
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
15public class ListenOnIPv6AnyAnalyzer : DiagnosticAnalyzer
Mvc\MvcAnalyzer.cs (1)
22public partial class MvcAnalyzer : DiagnosticAnalyzer
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
16public partial class RenderTreeBuilderAnalyzer : DiagnosticAnalyzer
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
19public class RoutePatternAnalyzer : DiagnosticAnalyzer
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
15public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\DetectAmbiguousRoutes.cs (1)
20public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\DetectMismatchedParameterOptionality.cs (1)
11public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\DetectMisplacedLambdaAttribute.cs (1)
12public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
14public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (1)
16public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\DisallowReturningActionResultFromMapMethods.cs (1)
14public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
RouteHandlers\RouteHandlerAnalyzer.cs (1)
19public partial class RouteHandlerAnalyzer : DiagnosticAnalyzer
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
14public sealed class PublicPartialProgramClassAnalyzer : DiagnosticAnalyzer
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
19public sealed class WebApplicationBuilderAnalyzer : DiagnosticAnalyzer
Microsoft.AspNetCore.App.Analyzers.Test (1)
Infrastructure\WellKnownTypesTests.cs (1)
88private class TestAnalyzer : DiagnosticAnalyzer
Microsoft.AspNetCore.Components.Analyzers (3)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
17public class ComponentInternalUsageDiagnosticAnalyzer : DiagnosticAnalyzer
ComponentParameterAnalyzer.cs (1)
20public sealed class ComponentParameterAnalyzer : DiagnosticAnalyzer
ComponentParameterUsageAnalyzer.cs (1)
13public class ComponentParameterUsageAnalyzer : DiagnosticAnalyzer
Microsoft.AspNetCore.Components.SdkAnalyzers (3)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
17public class ComponentInternalUsageDiagnosticAnalyzer : DiagnosticAnalyzer
ComponentParameterAnalyzer.cs (1)
15public class ComponentParameterAnalyzer : DiagnosticAnalyzer
ComponentParameterUsageAnalyzer.cs (1)
13public class ComponentParameterUsageAnalyzer : DiagnosticAnalyzer
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
11public class AttributesShouldNotBeAppliedToPageModelAnalyzer : DiagnosticAnalyzer
TagHelpersInCodeBlocksAnalyzer.cs (1)
13public class TagHelpersInCodeBlocksAnalyzer : DiagnosticAnalyzer
TopLevelParameterNameAnalyzer.cs (1)
14public class TopLevelParameterNameAnalyzer : DiagnosticAnalyzer
ViewFeatureAnalyzerBase.cs (1)
10public abstract class ViewFeatureAnalyzerBase : DiagnosticAnalyzer
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
13public class ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer : DiagnosticAnalyzer
ApiConventionAnalyzer.cs (1)
13public class ApiConventionAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
11internal abstract partial class CompilerDiagnosticAnalyzer : DiagnosticAnalyzer
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.cs (1)
14internal abstract partial class CompilerDiagnosticAnalyzer : DiagnosticAnalyzer
DiagnosticAnalyzer\DiagnosticSuppressor.cs (1)
12public abstract class DiagnosticSuppressor : DiagnosticAnalyzer
Microsoft.CodeAnalysis.Analyzers (19)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (1)
29public sealed class FixerWithFixAllAnalyzer : DiagnosticAnalyzer
ImmutableObjectMethodAnalyzer.cs (1)
22public sealed class ImmutableObjectMethodAnalyzer : DiagnosticAnalyzer
ImplementationIsObsoleteAnalyzer.cs (1)
17public class ImplementationIsObsoleteAnalyzer : DiagnosticAnalyzer
InternalImplementationOnlyAnalyzer.cs (1)
20public class InternalImplementationOnlyAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (1)
18public sealed class ClassIsNotDiagnosticAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
23public class CompareSymbolsCorrectlyAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (1)
18internal sealed class CompilerExtensionStrictApiAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (1)
19internal sealed class CompilerExtensionTargetFrameworkAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (1)
26public abstract class DiagnosticAnalyzerApiUsageAnalyzer<TTypeSyntax> : DiagnosticAnalyzer
MetaAnalyzers\DiagnosticAnalyzerCorrectnessAnalyzer.cs (1)
11public abstract partial class DiagnosticAnalyzerCorrectnessAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\DiagnosticAnalyzerCorrectnessAnalyzer.DiagnosticAnalyzerSymbolAnalyzer.cs (1)
12public abstract partial class DiagnosticAnalyzerCorrectnessAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\DiagnosticAnalyzerCorrectnessAnalyzer.SyntaxNodeWithinAnalyzerTypeCompilationAnalyzer.cs (1)
12public abstract partial class DiagnosticAnalyzerCorrectnessAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (1)
46public sealed partial class DiagnosticDescriptorCreationAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\DoNotUseCompilationGetSemanticModelAnalyzer.cs (1)
20public sealed class DoNotUseCompilationGetSemanticModelAnalyzer : DiagnosticAnalyzer
MetaAnalyzers\DoNotUseFileTypesForAnalyzersOrGenerators.cs (1)
15public sealed class DoNotUseFileTypesForAnalyzersOrGenerators : DiagnosticAnalyzer
MetaAnalyzers\PreferIsKindAnalyzer.cs (1)
20public sealed class PreferIsKindAnalyzer : DiagnosticAnalyzer
src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
19public abstract class SymbolIsBannedAnalyzerBase<TSyntaxKind> : DiagnosticAnalyzer
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
UpgradeMSBuildWorkspaceAnalyzer.cs (1)
18public abstract class UpgradeMSBuildWorkspaceAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
RestrictedInternalsVisibleToAnalyzer.cs (1)
25public abstract class RestrictedInternalsVisibleToAnalyzer<TNameSyntax, TSyntaxKind> : DiagnosticAnalyzer
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
SymbolIsBannedAnalyzerBase.cs (1)
19public abstract class SymbolIsBannedAnalyzerBase<TSyntaxKind> : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
14internal abstract partial class AbstractBuiltInCodeStyleDiagnosticAnalyzer : DiagnosticAnalyzer, IBuiltInAnalyzer
src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (1)
11internal abstract class AbstractCodeQualityDiagnosticAnalyzer : DiagnosticAnalyzer, IBuiltInAnalyzer
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
16: DiagnosticAnalyzer
Microsoft.CodeAnalysis.Compiler.Test.Resources (1)
Analyzers\DoNothingAnalyzer.cs (1)
12public sealed class DoNothingAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.Analyzers (1)
MetaAnalyzers\CSharpSemanticModelGetDeclaredSymbolAlwaysReturnsNullAnalyzer.cs (1)
19public sealed class CSharpSemanticModelGetDeclaredSymbolAlwaysReturnsNullAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
152private sealed class TestAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
14884private sealed class FieldAnalyzer : DiagnosticAnalyzer 15912internal abstract class CompilationStartedAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (4)
214private sealed class CompilationAnalyzerWithSyntaxTreeAnalyzer : DiagnosticAnalyzer 288private sealed class CodeBlockAnalyzerFactory : DiagnosticAnalyzer 346private sealed class InvalidSpanAnalyzer : DiagnosticAnalyzer 838private abstract class AbstractNuGetOrVsixAnalyzer : DiagnosticAnalyzer
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
32private sealed class QualifyWithThisAnalyzer : DiagnosticAnalyzer
Diagnostics\MockDiagnosticAnalyzerTests.cs (1)
20private sealed class MockDiagnosticAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (41)
Diagnostics\DiagnosticAnalyzerTests.cs (14)
35private class ComplainAboutX : DiagnosticAnalyzer 232private class SyntaxAndSymbolAnalyzer : DiagnosticAnalyzer 469internal class FullyDisabledAnalyzer : DiagnosticAnalyzer 485internal class PartiallyDisabledAnalyzer : DiagnosticAnalyzer 500internal class ImplicitlyDeclaredSymbolAnalyzer : DiagnosticAnalyzer 649public class FieldDeclarationAnalyzer : DiagnosticAnalyzer 745public class CodeBlockOrSyntaxNodeAnalyzer : DiagnosticAnalyzer 827public class MethodSymbolAnalyzer : DiagnosticAnalyzer 870public class AnalyzerReportingUnsupportedDiagnostic : DiagnosticAnalyzer 1633internal class OwningSymbolTestAnalyzer : DiagnosticAnalyzer 2277public class GeneratedCodeSyntaxAndOperationAnalyzer : DiagnosticAnalyzer 3827public class ActionsRegisteredAtDifferentScopesAnalyzer : DiagnosticAnalyzer 4068public class RecordDeclarationAnalyzer : DiagnosticAnalyzer 4106public class PrimaryConstructorBaseTypeAnalyzer : DiagnosticAnalyzer
Diagnostics\GetDiagnosticsTests.cs (2)
1054private sealed class BlockStartAnalyzer : DiagnosticAnalyzer 1835private class EnumTypeFieldSymbolAnalyzer : DiagnosticAnalyzer
Semantics\ExtensionTests.cs (4)
47481private class AnalyzerActions_01_Analyzer : DiagnosticAnalyzer 47552private class AnalyzerActions_02_Analyzer : DiagnosticAnalyzer 47600private class AnalyzerActions_03_Analyzer : DiagnosticAnalyzer 47652private class AnalyzerActions_04_Analyzer : DiagnosticAnalyzer
Semantics\OutVarTests.cs (1)
18794private class ConstructorInitializers_08_SyntaxAnalyzer : DiagnosticAnalyzer
Semantics\PrimaryConstructorTests.cs (13)
3715private class AnalyzerActions_01_Class_Analyzer : DiagnosticAnalyzer 4063private class AnalyzerActions_02_Class_Analyzer : DiagnosticAnalyzer 4145private class AnalyzerActions_03_Class_Analyzer : DiagnosticAnalyzer 4287private class AnalyzerActions_04_Class_Analyzer : DiagnosticAnalyzer 4490private class AnalyzerActions_05_Class_Analyzer : DiagnosticAnalyzer 4804private class AnalyzerActions_07_Class_Analyzer : DiagnosticAnalyzer 5125private class AnalyzerActions_09_Class_Analyzer : DiagnosticAnalyzer 5233private class AnalyzerActions_01_Struct_Analyzer : DiagnosticAnalyzer 5466private class AnalyzerActions_02_Struct_Analyzer : DiagnosticAnalyzer 5549private class AnalyzerActions_03_Struct_Analyzer : DiagnosticAnalyzer 5668private class AnalyzerActions_04_Struct_Analyzer : DiagnosticAnalyzer 5768private class AnalyzerActions_05_Struct_Analyzer : DiagnosticAnalyzer 5825private class AnalyzerActions_07_Struct_Analyzer : DiagnosticAnalyzer
Semantics\RecordTests.cs (7)
26259private class AnalyzerActions_01_Analyzer : DiagnosticAnalyzer 26604private class AnalyzerActions_02_Analyzer : DiagnosticAnalyzer 26694private class AnalyzerActions_03_Analyzer : DiagnosticAnalyzer 26854private class AnalyzerActions_04_Analyzer : DiagnosticAnalyzer 27057private class AnalyzerActions_05_Analyzer : DiagnosticAnalyzer 27371private class AnalyzerActions_07_Analyzer : DiagnosticAnalyzer 27694private class AnalyzerActions_09_Analyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (17)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4210private sealed class TestAnalyzer : DiagnosticAnalyzer
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
23private sealed class CustomDiagnosticAnalyzer : DiagnosticAnalyzer
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
23private sealed class CustomDiagnosticAnalyzer : DiagnosticAnalyzer
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
23private sealed class CustomDiagnosticAnalyzer : DiagnosticAnalyzer
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
26protected sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (3)
49protected sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 106protected sealed class CompilationEndDiagnosticAnalyzer : DiagnosticAnalyzer 1501private sealed class NonLocalDiagnosticsAnalyzer : DiagnosticAnalyzer
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (1)
36private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer
Diagnostics\Suppression\SuppressionTests.cs (7)
731private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 845private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 910private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 959private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 1100private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 2176private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer 2636private sealed class UserDiagnosticAnalyzer : DiagnosticAnalyzer
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
152private sealed class TestAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
Semantics\ColorColorTests.cs (1)
1766class ColorColorSymbolInfoInArrowExpressionClauseSyntaxAnalyzer : DiagnosticAnalyzer
Semantics\RecordStructTests.cs (7)
6003private class AnalyzerActions_01_Analyzer : DiagnosticAnalyzer 6237private class AnalyzerActions_02_Analyzer : DiagnosticAnalyzer 6328private class AnalyzerActions_03_Analyzer : DiagnosticAnalyzer 6465private class AnalyzerActions_04_Analyzer : DiagnosticAnalyzer 6565private class AnalyzerActions_05_Analyzer : DiagnosticAnalyzer 6622private class AnalyzerActions_07_Analyzer : DiagnosticAnalyzer 6869private class AnalyzerActions_09_Analyzer : DiagnosticAnalyzer
Semantics\TopLevelStatementsTests.cs (13)
6417private class AnalyzerActions_01_Analyzer : DiagnosticAnalyzer 6518private class AnalyzerActions_02_Analyzer : DiagnosticAnalyzer 6587private class AnalyzerActions_03_Analyzer : DiagnosticAnalyzer 6700private class AnalyzerActions_04_Analyzer : DiagnosticAnalyzer 6783private class AnalyzerActions_05_Analyzer : DiagnosticAnalyzer 6841private class AnalyzerActions_06_Analyzer : DiagnosticAnalyzer 6899private class AnalyzerActions_07_Analyzer : DiagnosticAnalyzer 6967private class AnalyzerActions_08_Analyzer : DiagnosticAnalyzer 7046private class AnalyzerActions_09_Analyzer : DiagnosticAnalyzer 7161private class AnalyzerActions_10_Analyzer : DiagnosticAnalyzer 7255private class AnalyzerActions_11_Analyzer : DiagnosticAnalyzer 7328private class AnalyzerActions_12_Analyzer : DiagnosticAnalyzer 7395private class AnalyzerActions_13_Analyzer : DiagnosticAnalyzer
SourceGeneration\GeneratorDriverTests.cs (1)
173private class Analyzer_Is_Run_Analyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\Source\NullablePublicAPITests.cs (3)
1153private class NullabilityPrinter : DiagnosticAnalyzer 1774private class CSharp73ProvidesNullableSemanticInfo_Analyzer : DiagnosticAnalyzer 4827private class AutoPropInitializer_02_Analyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
CodeFixes\CodeFixServiceTests.cs (3)
501public sealed class MockDiagnosticAnalyzer : DiagnosticAnalyzer 877internal sealed class AdditionalFileAnalyzer : DiagnosticAnalyzer 1147public sealed class DeprioritizedAnalyzer : DiagnosticAnalyzer
Diagnostics\DiagnosticAnalyzerServiceTests.cs (3)
842private sealed class Analyzer : DiagnosticAnalyzer 858private sealed class DisabledByDefaultAnalyzer : DiagnosticAnalyzer 897private sealed class NamedTypeAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (19)
CodeFixes\CodeFixServiceTests.vb (1)
189Inherits DiagnosticAnalyzer
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
64Inherits DiagnosticAnalyzer
Diagnostics\DiagnosticServiceTests.vb (17)
1249Inherits DiagnosticAnalyzer 1368Inherits DiagnosticAnalyzer 1447Inherits DiagnosticAnalyzer 1539Inherits DiagnosticAnalyzer 1559Inherits DiagnosticAnalyzer 1592Inherits DiagnosticAnalyzer 1616Inherits DiagnosticAnalyzer 1635Inherits DiagnosticAnalyzer 1659Inherits DiagnosticAnalyzer 1687Inherits DiagnosticAnalyzer 1713Inherits DiagnosticAnalyzer 1739Inherits DiagnosticAnalyzer 1762Inherits DiagnosticAnalyzer 1801Inherits DiagnosticAnalyzer 1875Inherits DiagnosticAnalyzer 2380Inherits DiagnosticAnalyzer 2497Inherits DiagnosticAnalyzer
Microsoft.CodeAnalysis.Features (4)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
22internal abstract class UnboundIdentifiersDiagnosticAnalyzerBase<TLanguageKindEnum, TSimpleNameSyntax, TQualifiedNameSyntax, TIncompleteMemberSyntax> : DiagnosticAnalyzer, IBuiltInAnalyzer
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
14internal abstract partial class AbstractBuiltInCodeStyleDiagnosticAnalyzer : DiagnosticAnalyzer, IBuiltInAnalyzer
src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (1)
11internal abstract class AbstractCodeQualityDiagnosticAnalyzer : DiagnosticAnalyzer, IBuiltInAnalyzer
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
16: DiagnosticAnalyzer
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
160private sealed class MockAdditionalFileDiagnosticAnalyzer : DiagnosticAnalyzer
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (2)
84private sealed class BuildOnlyAnalyzer : DiagnosticAnalyzer 96private sealed class LiveAnalyzer : DiagnosticAnalyzer
Diagnostics\NonLocalDiagnosticTests.cs (1)
74private sealed class NonLocalDiagnosticsAnalyzer : DiagnosticAnalyzer
Diagnostics\PullDiagnosticTests.cs (2)
122private sealed class CSharpSyntaxAnalyzer : DiagnosticAnalyzer 136private sealed class CSharpSemanticAnalyzer : DiagnosticAnalyzer
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
71private sealed class MockProjectDiagnosticAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
AbstractAllocationAnalyzer.cs (1)
11internal abstract class AbstractAllocationAnalyzer : DiagnosticAnalyzer
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
DeclarePublicApiAnalyzer.cs (1)
19public sealed partial class DeclarePublicApiAnalyzer : DiagnosticAnalyzer
DeclarePublicApiAnalyzer.Impl.cs (1)
26public partial class DeclarePublicApiAnalyzer : DiagnosticAnalyzer
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
DeterministicKeyBuilderTests.Helpers.cs (2)
30private sealed class Analyzer : DiagnosticAnalyzer 37private sealed class Analyzer2 : DiagnosticAnalyzer
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.Test.Utilities (94)
Diagnostics\BoxingOperationAnalyzer.cs (1)
15public class BoxingOperationAnalyzer : DiagnosticAnalyzer
Diagnostics\CommonDiagnosticAnalyzers.cs (45)
29public class AnalyzerForErrorLogTest : DiagnosticAnalyzer 531public class NotConfigurableDiagnosticAnalyzer : DiagnosticAnalyzer 573public class CodeBlockActionAnalyzer : DiagnosticAnalyzer 638public abstract class CodeBlockObjectCreationAnalyzer<TLanguageKindEnum> : DiagnosticAnalyzer 666public class CSharpGenericNameAnalyzer : DiagnosticAnalyzer 704public abstract class AbstractNamespaceDeclarationAnalyzer<TLanguageKindEnum> : DiagnosticAnalyzer 733public sealed class AnalyzerWithNoActions : DiagnosticAnalyzer 748public sealed class AnalyzerWithDisabledRules : DiagnosticAnalyzer 772public sealed class EnsureNoMergedNamespaceSymbolAnalyzer : DiagnosticAnalyzer 804public sealed class AnalyzerWithNoSupportedDiagnostics : DiagnosticAnalyzer 811public sealed class AnalyzerWithInvalidDiagnosticId : DiagnosticAnalyzer 830public sealed class AnalyzerWithNullDescriptor : DiagnosticAnalyzer 840public sealed class AnalyzerWithCSharpCompilerDiagnosticId : DiagnosticAnalyzer 861public sealed class AnalyzerWithBasicCompilerDiagnosticId : DiagnosticAnalyzer 882public sealed class AnalyzerWithInvalidDiagnosticSpan : DiagnosticAnalyzer 916public sealed class AnalyzerWithInvalidDiagnosticLocation : DiagnosticAnalyzer 981public sealed class AnalyzerThatThrowsInSupportedDiagnostics : DiagnosticAnalyzer 988public sealed class AnalyzerThatThrowsInGetMessage : DiagnosticAnalyzer 1027public sealed class AnalyzerReportingMisformattedDiagnostic : DiagnosticAnalyzer 1049public class CompilationAnalyzerWithSeverity : DiagnosticAnalyzer 1087public class SemanticModelAnalyzerWithId : DiagnosticAnalyzer 1116public class ConcurrentAnalyzer : DiagnosticAnalyzer 1188public class NonConcurrentAnalyzer : DiagnosticAnalyzer 1226public sealed class OperationAnalyzer : DiagnosticAnalyzer 1375public sealed class OperationBlockAnalyzer : DiagnosticAnalyzer 1400public sealed class FieldReferenceOperationAnalyzer : DiagnosticAnalyzer 1451public sealed class MethodOrConstructorBodyOperationAnalyzer : DiagnosticAnalyzer 1472public abstract class AbstractGeneratedCodeAnalyzer<TSyntaxKind> : DiagnosticAnalyzer 1681public class GeneratedCodeAnalyzer2 : DiagnosticAnalyzer 1715public class SharedStateAnalyzer : DiagnosticAnalyzer 1845public class AnalyzerForParameters : DiagnosticAnalyzer 1869public class SymbolStartAnalyzer : DiagnosticAnalyzer 2383public sealed class NamedTypeAnalyzer : DiagnosticAnalyzer 2467public sealed class AnalyzerWithNoLocationDiagnostics : DiagnosticAnalyzer 2491public sealed class NamedTypeAnalyzerWithConfigurableEnabledByDefault : DiagnosticAnalyzer 2550public sealed class RegisterOperationBlockAndOperationActionAnalyzer : DiagnosticAnalyzer 2575public sealed class FieldAnalyzer : DiagnosticAnalyzer 2617public class AdditionalFileAnalyzer : DiagnosticAnalyzer 2666public sealed class RegisterSyntaxTreeCancellationAnalyzer : DiagnosticAnalyzer 2703public sealed class LocalNonLocalDiagnosticsAnalyzer : DiagnosticAnalyzer 2858public sealed class VariableDeclarationAnalyzer : DiagnosticAnalyzer 2904internal sealed class CancellationTestAnalyzer : DiagnosticAnalyzer 2973public sealed class AllActionsAnalyzer : DiagnosticAnalyzer 3060public sealed class FilterSpanTestAnalyzer : DiagnosticAnalyzer 3224public class MinimumReportedSeverityAnalyzer : DiagnosticAnalyzer
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
16public class SymbolCouldHaveMoreSpecificTypeAnalyzer : DiagnosticAnalyzer
Diagnostics\EmptyArrayAnalyzer.cs (1)
15public class EmptyArrayAnalyzer : DiagnosticAnalyzer
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
16public class FieldCouldBeReadOnlyAnalyzer : DiagnosticAnalyzer
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
16public class LocalCouldBeConstAnalyzer : DiagnosticAnalyzer
Diagnostics\OperationTestAnalyzer.cs (35)
20public class BadStuffTestAnalyzer : DiagnosticAnalyzer 82public class OwningSymbolTestAnalyzer : DiagnosticAnalyzer 120public class BigForTestAnalyzer : DiagnosticAnalyzer 293public class SwitchTestAnalyzer : DiagnosticAnalyzer 489public class InvocationTestAnalyzer : DiagnosticAnalyzer 606public class SeventeenTestAnalyzer : DiagnosticAnalyzer 643public class NullArgumentTestAnalyzer : DiagnosticAnalyzer 683public class MemberInitializerTestAnalyzer : DiagnosticAnalyzer 729public class AssignmentTestAnalyzer : DiagnosticAnalyzer 770public class ArrayInitializerTestAnalyzer : DiagnosticAnalyzer 810public class VariableDeclarationTestAnalyzer : DiagnosticAnalyzer 867public class CaseTestAnalyzer : DiagnosticAnalyzer 928public class ExplicitVsImplicitInstanceAnalyzer : DiagnosticAnalyzer 962public class MemberReferenceAnalyzer : DiagnosticAnalyzer 1075public class ParamsArrayTestAnalyzer : DiagnosticAnalyzer 1164public class EqualsValueTestAnalyzer : DiagnosticAnalyzer 1203public class NoneOperationTestAnalyzer : DiagnosticAnalyzer 1233public class AddressOfTestAnalyzer : DiagnosticAnalyzer 1274public class LambdaTestAnalyzer : DiagnosticAnalyzer 1343public class StaticMemberTestAnalyzer : DiagnosticAnalyzer 1424public class LabelOperationsTestAnalyzer : DiagnosticAnalyzer 1474public class UnaryAndBinaryOperationsTestAnalyzer : DiagnosticAnalyzer 1551public class BinaryOperatorVBTestAnalyzer : DiagnosticAnalyzer 1582public class OperatorPropertyPullerTestAnalyzer : DiagnosticAnalyzer 1661public class NullOperationSyntaxTestAnalyzer : DiagnosticAnalyzer 1748public class InvalidOperatorExpressionTestAnalyzer : DiagnosticAnalyzer 1817public class ConditionalAccessOperationTestAnalyzer : DiagnosticAnalyzer 1872public class ConversionExpressionCSharpTestAnalyzer : DiagnosticAnalyzer 1904public class ForLoopConditionCrashVBTestAnalyzer : DiagnosticAnalyzer 1943public class TrueFalseUnaryOperationTestAnalyzer : DiagnosticAnalyzer 1985public class AssignmentOperationSyntaxTestAnalyzer : DiagnosticAnalyzer 2029public class LiteralTestAnalyzer : DiagnosticAnalyzer 2059public class AnalysisContextAnalyzer : DiagnosticAnalyzer 2087public class CompilationStartAnalysisContextAnalyzer : DiagnosticAnalyzer 2119public class SemanticModelAnalyzer : DiagnosticAnalyzer
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (8)
25protected class WarningOnCompilationEndedAnalyzer : DiagnosticAnalyzer 50protected class WarningOnNamePrefixDeclarationAnalyzer : DiagnosticAnalyzer 90protected class WarningOnTypeDeclarationAnalyzer : DiagnosticAnalyzer 115protected class WarningOnCodeBodyAnalyzer : DiagnosticAnalyzer 187protected class WarningOnCommentAnalyzer : DiagnosticAnalyzer 220protected class WarningOnTokenAnalyzer : DiagnosticAnalyzer 256protected class ThrowExceptionForEachNamedTypeAnalyzer : DiagnosticAnalyzer 290protected class ThrowExceptionFromSupportedDiagnostics : DiagnosticAnalyzer
Diagnostics\TestDiagnosticAnalyzer.cs (1)
15public abstract class TestDiagnosticAnalyzer<TLanguageKindEnum> : DiagnosticAnalyzer where TLanguageKindEnum : struct
Microsoft.CodeAnalysis.UnitTests (9)
Analyzers\AnalyzerFileReferenceTests.cs (7)
596public class TestAnalyzer : DiagnosticAnalyzer 603public class TestAnalyzerCS : DiagnosticAnalyzer 610public class TestAnalyzerVB : DiagnosticAnalyzer 626public class NestedAnalyzer : DiagnosticAnalyzer 659public class TestAnalyzerCSVB : DiagnosticAnalyzer 669public abstract class AbstractAnalyzer : DiagnosticAnalyzer 676public class OpenGenericAnalyzer<T> : DiagnosticAnalyzer
Diagnostics\AnalysisContextInfoTests.cs (1)
53private class Analyzer : DiagnosticAnalyzer
Diagnostics\DiagnosticLocalizationTests.cs (1)
365private class MyAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
10943Inherits DiagnosticAnalyzer
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (7)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
16Inherits DiagnosticAnalyzer
Diagnostics\Suppression\SuppressionTests.vb (6)
694Inherits DiagnosticAnalyzer 769Inherits DiagnosticAnalyzer 813Inherits DiagnosticAnalyzer 879Inherits DiagnosticAnalyzer 999Inherits DiagnosticAnalyzer 1715Inherits DiagnosticAnalyzer
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (12)
Diagnostics\DiagnosticAnalyzerTests.vb (10)
24Inherits DiagnosticAnalyzer 212Inherits DiagnosticAnalyzer 228Inherits DiagnosticAnalyzer 262Inherits DiagnosticAnalyzer 300Inherits DiagnosticAnalyzer 345Inherits DiagnosticAnalyzer 396Inherits DiagnosticAnalyzer 494Inherits DiagnosticAnalyzer 559Inherits DiagnosticAnalyzer 947Inherits DiagnosticAnalyzer
Diagnostics\GetDiagnosticsTests.vb (2)
585Inherits DiagnosticAnalyzer 709Inherits DiagnosticAnalyzer
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\ParseDirectives.vb (1)
3153Inherits DiagnosticAnalyzer
Microsoft.CodeAnalysis.Workspaces (1)
Diagnostics\DocumentDiagnosticAnalyzer.cs (1)
15internal abstract class DocumentDiagnosticAnalyzer : DiagnosticAnalyzer
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
BatchFixAllProviderTests.cs (1)
44private sealed class LiteralZeroAnalyzer : DiagnosticAnalyzer
SolutionTests\SolutionTests.cs (1)
2991private sealed class MockDiagnosticAnalyzer : DiagnosticAnalyzer
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\BaseAnalyzer.cs (1)
10public abstract class BaseAnalyzer : DiagnosticAnalyzer
Microsoft.Interop.ComInterfaceGenerator (5)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
14public class AddGeneratedComClassAnalyzer : DiagnosticAnalyzer
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (1)
15public class ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer : DiagnosticAnalyzer
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
18public class ConvertComImportToGeneratedComInterfaceAnalyzer : DiagnosticAnalyzer
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
18public class GeneratedComInterfaceAttributeAnalyzer : DiagnosticAnalyzer
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
19public class RuntimeComApiUsageWithSourceGeneratedComAnalyzer : DiagnosticAnalyzer
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
19public class ConvertToLibraryImportAnalyzer : DiagnosticAnalyzer
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
19public class CustomMarshallerAttributeAnalyzer : DiagnosticAnalyzer
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
20public class NativeMarshallingAttributeAnalyzer : DiagnosticAnalyzer
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
104public class WarnForMissingAsyncSuffix : DiagnosticAnalyzer
Microsoft.ML.InternalCodeAnalyzer (9)
BaseTestClassAnalyzer.cs (1)
14public sealed class BaseTestClassAnalyzer : DiagnosticAnalyzer
BestFriendAnalyzer.cs (1)
15public sealed class BestFriendAnalyzer : DiagnosticAnalyzer
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
14public sealed class BestFriendOnPublicDeclarationsAnalyzer : DiagnosticAnalyzer
ContractsCheckAnalyzer.cs (1)
15public sealed class ContractsCheckAnalyzer : DiagnosticAnalyzer
InstanceInitializerAnalyzer.cs (1)
15public sealed class InstanceInitializerAnalyzer : DiagnosticAnalyzer
NameAnalyzer.cs (1)
25public sealed class NameAnalyzer : DiagnosticAnalyzer
ParameterVariableNameAnalyzer.cs (1)
15public sealed class ParameterVariableNameAnalyzer : DiagnosticAnalyzer
SingleVariableDeclarationAnalyzer.cs (1)
15public sealed class SingleVariableDeclarationAnalyzer : DiagnosticAnalyzer
TypeParamNameAnalyzer.cs (1)
14public sealed class TypeParamNameAnalyzer : DiagnosticAnalyzer
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (1)
71public sealed class MockDiagnosticAnalyzer : DiagnosticAnalyzer
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (1)
268Inherits DiagnosticAnalyzer
Roslyn.Diagnostics.Analyzers (12)
AbstractDoNotCopyValue.cs (1)
28public abstract class AbstractDoNotCopyValue : DiagnosticAnalyzer
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
24public class DefaultableTypeShouldHaveDefaultableFieldsAnalyzer : DiagnosticAnalyzer
DoNotCallGetTestAccessor.cs (1)
21public sealed class DoNotCallGetTestAccessor : DiagnosticAnalyzer
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (1)
24public sealed class DoNotMixAttributesFromDifferentVersionsOfMEFAnalyzer : DiagnosticAnalyzer
ExportedPartsShouldHaveImportingConstructor.cs (1)
27public sealed class ExportedPartsShouldHaveImportingConstructor : DiagnosticAnalyzer
ImportingConstructorShouldBeObsolete.cs (1)
29public sealed class ImportingConstructorShouldBeObsolete : DiagnosticAnalyzer
PartsExportedWithMEFv2MustBeMarkedAsShared.cs (1)
22public sealed class PartsExportedWithMEFv2MustBeMarkedAsSharedAnalyzer : DiagnosticAnalyzer
SpecializedEnumerableCreationAnalyzer.cs (1)
27public abstract class SpecializedEnumerableCreationAnalyzer : DiagnosticAnalyzer
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
28public abstract class SymbolDeclaredEventAnalyzer<TSyntaxKind> : DiagnosticAnalyzer
TemporaryArrayAsRefAnalyzer.cs (1)
21public class TemporaryArrayAsRefAnalyzer : DiagnosticAnalyzer
TestExportsShouldNotBeDiscoverable.cs (1)
27public sealed class TestExportsShouldNotBeDiscoverable : DiagnosticAnalyzer
Roslyn.Diagnostics.Analyzers.UnitTests (1)
RelaxTestNamingSuppressorTests.cs (1)
105public class WarnForMissingAsyncSuffix : DiagnosticAnalyzer
Roslyn.Diagnostics.CSharp.Analyzers (4)
CSharpAvoidOptSuffixForNullableEnableCode.cs (1)
26public sealed class CSharpAvoidOptSuffixForNullableEnableCode : DiagnosticAnalyzer
CSharpDoNotCapturePrimaryContructorParameters.cs (1)
17public class DoNotCapturePrimaryConstructorParametersAnalyzer : DiagnosticAnalyzer
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (1)
18public sealed class CSharpDoNotUseDebugAssertForInterpolatedStrings : DiagnosticAnalyzer
PreferNullLiteral.cs (1)
20public sealed class PreferNullLiteral : DiagnosticAnalyzer
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
BasicInvokeTheCorrectPropertyToEnsureCorrectUseSiteDiagnostics.vb (1)
16Inherits DiagnosticAnalyzer
Roslyn.VisualStudio.Next.UnitTests (2)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
271private sealed class MyAnalyzer : DiagnosticAnalyzer 291private sealed class DuplicateAnalyzer : DiagnosticAnalyzer
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
25public class IntrinsicsInSystemPrivateCoreLibAnalyzer : DiagnosticAnalyzer
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexAnalyzer.cs (1)
21public sealed class UpgradeToGeneratedRegexAnalyzer : DiagnosticAnalyzer
System.Windows.Forms.Analyzers (1)
System\Windows\Forms\Analyzers\AppManifestAnalyzer.cs (1)
14internal partial class AppManifestAnalyzer : DiagnosticAnalyzer
System.Windows.Forms.Analyzers.CSharp (3)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
14public class AvoidPassingTaskWithoutCancellationTokenAnalyzer : DiagnosticAnalyzer
System\Windows\Forms\CSharp\Analyzers\ImplementITypedDataObject\ImplementITypedDataObjectAnalyzer.cs (1)
14public sealed class ImplementITypedDataObjectAnalyzer : DiagnosticAnalyzer
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
13public class MissingPropertySerializationConfigurationAnalyzer : DiagnosticAnalyzer
System.Windows.Forms.Analyzers.VisualBasic (3)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
14Inherits DiagnosticAnalyzer
Analyzers\ImplementITypedDataObject\ImplementITypedDataObjectInAdditionToIDataObjectAnalyzer.vb (1)
16Inherits DiagnosticAnalyzer
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
13Inherits DiagnosticAnalyzer
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
Text.Analyzers (3)
EnumsShouldHavePluralNames.cs (1)
23public sealed class EnumsShouldHavePluralNamesAnalyzer : DiagnosticAnalyzer
IdentifiersShouldBeSpelledCorrectly.cs (1)
24public sealed class IdentifiersShouldBeSpelledCorrectlyAnalyzer : DiagnosticAnalyzer
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
18internal abstract class DoNotCatchGeneralUnlessRethrownAnalyzer : DiagnosticAnalyzer
1716 references to DiagnosticAnalyzer
AnalyzerRunner (14)
DiagnosticAnalyzerRunner.cs (14)
27private readonly ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> _analyzers; 178private static async Task<DocumentAnalyzerPerformance> TestDocumentPerformanceAsync(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Project project, DocumentId documentId, Options analyzerOptionsInternal, CancellationToken cancellationToken) 182languageAnalyzers = ImmutableArray<DiagnosticAnalyzer>.Empty; 232private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> FilterAnalyzers(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Options options) 239private static IEnumerable<DiagnosticAnalyzer> FilterAnalyzers(IEnumerable<DiagnosticAnalyzer> analyzers, Options options) 259foreach (var analyzer in analyzers) 285private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetDiagnosticAnalyzers(string path) 304private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetDiagnosticAnalyzersFromFile(string path) 309return ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty 316ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, 380ImmutableArray<DiagnosticAnalyzer> analyzers, 414var telemetryInfoDictionary = new Dictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>();
Aspire.Hosting.Analyzers.Tests (1)
AnalyzerTest.cs (1)
15where TAnalyzer : DiagnosticAnalyzer, new()
CodeStyleConfigFileGenerator (1)
Program.cs (1)
59foreach (var analyzer in analyzers)
GenerateDocumentationAndConfigFiles (5)
Program.cs (1)
287foreach (var analyzer in analyzers)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
GenerateRulesMissingDocumentation (1)
Program.cs (1)
157foreach (var analyzer in analyzers)
Metrics (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Metrics.Legacy (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.Analyzers.Extra.Tests (5)
Resources\RoslynTestUtils.cs (5)
235DiagnosticAnalyzer analyzer, 287DiagnosticAnalyzer analyzer, 405DiagnosticAnalyzer analyzer, 514ImmutableArray<DiagnosticAnalyzer> analyzers, 547private readonly ImmutableArray<DiagnosticAnalyzer> _analyzers;
Microsoft.Analyzers.Local.Tests (5)
Resources\RoslynTestUtils.cs (5)
235DiagnosticAnalyzer analyzer, 288DiagnosticAnalyzer analyzer, 406DiagnosticAnalyzer analyzer, 515ImmutableArray<DiagnosticAnalyzer> analyzers, 548private readonly ImmutableArray<DiagnosticAnalyzer> _analyzers;
Microsoft.AspNetCore.Analyzer.Testing (5)
DiagnosticAnalyzerRunner.cs (3)
15/// Base type for executing a <see cref="DiagnosticAnalyzer" />. Derived types implemented in the test assembly will 33DiagnosticAnalyzer analyzer, 55DiagnosticAnalyzer analyzer,
DiagnosticVerifier.cs (2)
58protected Task<Diagnostic[]> GetDiagnosticsAsync(string[] sources, DiagnosticAnalyzer analyzer, string[] additionalEnabledDiagnostics) 71protected async Task<Diagnostic[]> GetDiagnosticsAsync(Document[] documents, DiagnosticAnalyzer analyzer, string[] additionalEnabledDiagnostics)
Microsoft.AspNetCore.Analyzers.Test (1)
StartupCSharpAnalyzerTest.cs (1)
23protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() => new[] { StartupAnalyzer };
Microsoft.AspNetCore.App.Analyzers.Test (4)
TestDiagnosticAnalyzer.cs (2)
22public TestDiagnosticAnalyzerRunner(DiagnosticAnalyzer analyzer) 27public DiagnosticAnalyzer Analyzer { get; }
Verifiers\CSharpAnalyzerVerifier.cs (1)
18where TAnalyzer : DiagnosticAnalyzer, new()
Verifiers\CSharpCodeFixVerifier.cs (1)
13where TAnalyzer : DiagnosticAnalyzer, new()
Microsoft.AspNetCore.Components.Analyzers.Tests (18)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
12public ComponentAnalyzerDiagnosticAnalyzerRunner(DiagnosticAnalyzer analyzer) 17public DiagnosticAnalyzer Analyzer { get; }
ComponentParameterCaptureUnmatchedValuesHasWrongTypeTest.cs (1)
74protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
ComponentParameterCaptureUnmatchedValuesMustBeUniqueTest.cs (1)
62protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
ComponentParameterSettersShouldBePublicTest.cs (1)
108protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterAnalyzer();
ComponentParameterShouldBeAutoPropertiesTest.cs (1)
151protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterAnalyzer();
ComponentParametersShouldBePublicCodeFixProviderTest.cs (1)
120protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
ComponentParametersShouldBePublicTest.cs (1)
103protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterAnalyzer();
ComponentParameterUsageAnalyzerTest.cs (1)
358protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterUsageAnalyzer();
Helpers\DiagnosticVerifier.Helper.cs (2)
39private static Diagnostic[] GetSortedDiagnostics(string[] sources, string language, DiagnosticAnalyzer analyzer) 51protected static Diagnostic[] GetSortedDiagnosticsFromDocuments(DiagnosticAnalyzer analyzer, Document[] documents)
Verifiers\CodeFixVerifier.cs (1)
76private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProvider codeFixProvider, string oldSource, string newSource, int? codeFixIndex, bool allowNewCompilerDiagnostics)
Verifiers\DiagnosticVerifier.cs (6)
22protected virtual DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() 30protected virtual DiagnosticAnalyzer GetBasicDiagnosticAnalyzer() 90private void VerifyDiagnostics(string[] sources, string language, DiagnosticAnalyzer analyzer, params DiagnosticResult[] expected) 106private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResults, DiagnosticAnalyzer analyzer, params DiagnosticResult[] expectedResults) 190private static void VerifyDiagnosticLocation(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, Location actual, DiagnosticResultLocation expected) 237private static string FormatDiagnostics(DiagnosticAnalyzer analyzer, params Diagnostic[] diagnostics)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (17)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
12public ComponentAnalyzerDiagnosticAnalyzerRunner(DiagnosticAnalyzer analyzer) 17public DiagnosticAnalyzer Analyzer { get; }
ComponentParameterCaptureUnmatchedValuesHasWrongTypeTest.cs (1)
74protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
ComponentParameterCaptureUnmatchedValuesMustBeUniqueTest.cs (1)
62protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
ComponentParameterSettersShouldBePublicTest.cs (1)
108protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterAnalyzer();
ComponentParametersShouldBePublicCodeFixProviderTest.cs (1)
120protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
ComponentParametersShouldBePublicTest.cs (1)
103protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterAnalyzer();
ComponentParameterUsageAnalyzerTest.cs (1)
358protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterUsageAnalyzer();
Helpers\DiagnosticVerifier.Helper.cs (2)
39private static Diagnostic[] GetSortedDiagnostics(string[] sources, string language, DiagnosticAnalyzer analyzer) 51protected static Diagnostic[] GetSortedDiagnosticsFromDocuments(DiagnosticAnalyzer analyzer, Document[] documents)
Verifiers\CodeFixVerifier.cs (1)
76private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProvider codeFixProvider, string oldSource, string newSource, int? codeFixIndex, bool allowNewCompilerDiagnostics)
Verifiers\DiagnosticVerifier.cs (6)
22protected virtual DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() 30protected virtual DiagnosticAnalyzer GetBasicDiagnosticAnalyzer() 90private void VerifyDiagnostics(string[] sources, string language, DiagnosticAnalyzer analyzer, params DiagnosticResult[] expected) 106private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResults, DiagnosticAnalyzer analyzer, params DiagnosticResult[] expectedResults) 190private static void VerifyDiagnosticLocation(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, Location actual, DiagnosticResultLocation expected) 237private static string FormatDiagnostics(DiagnosticAnalyzer analyzer, params Diagnostic[] diagnostics)
Microsoft.CodeAnalysis (505)
CommandLine\CommandLineArguments.cs (4)
190/// Skip execution of <see cref="DiagnosticAnalyzer"/>s. 488out ImmutableArray<DiagnosticAnalyzer> analyzers, 491var analyzerBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 573bool shouldIncludeAnalyzer(DiagnosticAnalyzer analyzer) => !skipAnalyzers || analyzer is DiagnosticSuppressor;
CommandLine\CommonCompiler.cs (3)
122out ImmutableArray<DiagnosticAnalyzer> analyzers, 1097ImmutableArray<DiagnosticAnalyzer> analyzers, 1747ImmutableArray<DiagnosticAnalyzer> analyzers,
CommandLine\ReportAnalyzerUtil.cs (1)
105private static IEnumerable<string> GetSupportedIds(DiagnosticAnalyzer analyzer)
Compilation\Compilation.cs (3)
126internal abstract AnalyzerDriver CreateAnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerManager analyzerManager, SeverityFilter severityFilter); 201ImmutableArray<DiagnosticAnalyzer> analyzers = default, 213ImmutableArray<DiagnosticAnalyzer> analyzers = default,
Compilation\DeterministicKey.cs (2)
56ImmutableArray<DiagnosticAnalyzer> analyzers = default, 83ImmutableArray<DiagnosticAnalyzer> analyzers = default,
Compilation\DeterministicKeyBuilder.cs (2)
127ImmutableArray<DiagnosticAnalyzer> analyzers, 176foreach (var analyzer in analyzers)
Diagnostic\WellKnownDiagnosticTags.cs (1)
60/// Indicates that the diagnostic is related to an exception thrown by a <see cref="DiagnosticAnalyzer"/>.
DiagnosticAnalyzer\AnalysisResult.cs (20)
23ImmutableArray<DiagnosticAnalyzer> analyzers, 24ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSyntaxDiagnostics, 25ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSemanticDiagnostics, 26ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localAdditionalFileDiagnostics, 27ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics, 28ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> analyzerTelemetryInfo) 41public ImmutableArray<DiagnosticAnalyzer> Analyzers { get; } 46public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> SyntaxDiagnostics { get; } 51public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> SemanticDiagnostics { get; } 56public ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> AdditionalFileDiagnostics { get; } 61public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> CompilationDiagnostics { get; } 66public ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> AnalyzerTelemetryInfo { get; } 71public ImmutableArray<Diagnostic> GetAllDiagnostics(DiagnosticAnalyzer analyzer) 89private ImmutableArray<Diagnostic> GetDiagnostics(IEnumerable<DiagnosticAnalyzer> analyzers) 92var excludedAnalyzersSet = excludedAnalyzers.Any() ? excludedAnalyzers.ToImmutableHashSet() : ImmutableHashSet<DiagnosticAnalyzer>.Empty; 96private ImmutableArray<Diagnostic> GetDiagnostics(ImmutableHashSet<DiagnosticAnalyzer> excludedAnalyzers) 113ImmutableDictionary<T, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localDiagnostics, 114ImmutableHashSet<DiagnosticAnalyzer> excludedAnalyzers, 133ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics, 134ImmutableHashSet<DiagnosticAnalyzer> excludedAnalyzers,
DiagnosticAnalyzer\AnalysisResultBuilder.cs (64)
29private readonly Dictionary<DiagnosticAnalyzer, TimeSpan>? _analyzerExecutionTimeOpt; 30private readonly HashSet<DiagnosticAnalyzer> _completedAnalyzersForCompilation; 31private readonly Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>> _completedSyntaxAnalyzersByTree; 32private readonly Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>> _completedSemanticAnalyzersByTree; 33private readonly Dictionary<AdditionalText, HashSet<DiagnosticAnalyzer>> _completedSyntaxAnalyzersByAdditionalFile; 34private readonly Dictionary<DiagnosticAnalyzer, AnalyzerActionCounts> _analyzerActionCounts; 37private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSemanticDiagnosticsOpt = null; 38private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSyntaxDiagnosticsOpt = null; 39private Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localAdditionalFileDiagnosticsOpt = null; 40private Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? _nonLocalDiagnosticsOpt = null; 42internal AnalysisResultBuilder(bool logAnalyzerExecutionTime, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableArray<AdditionalText> additionalFiles) 45_completedAnalyzersForCompilation = new HashSet<DiagnosticAnalyzer>(); 46_completedSyntaxAnalyzersByTree = new Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>>(); 47_completedSemanticAnalyzersByTree = new Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>>(); 48_completedSyntaxAnalyzersByAdditionalFile = new Dictionary<AdditionalText, HashSet<DiagnosticAnalyzer>>(); 49_analyzerActionCounts = new Dictionary<DiagnosticAnalyzer, AnalyzerActionCounts>(analyzers.Length); 53private static Dictionary<DiagnosticAnalyzer, TimeSpan> CreateAnalyzerExecutionTimeMap(ImmutableArray<DiagnosticAnalyzer> analyzers) 55var map = new Dictionary<DiagnosticAnalyzer, TimeSpan>(analyzers.Length); 56foreach (var analyzer in analyzers) 95public TimeSpan GetAnalyzerExecutionTime(DiagnosticAnalyzer analyzer) 105private HashSet<DiagnosticAnalyzer>? GetCompletedAnalyzersForFile_NoLock(SourceOrAdditionalFile filterFile, bool syntax) 130private void AddCompletedAnalyzerForFile_NoLock(SourceOrAdditionalFile filterFile, bool syntax, DiagnosticAnalyzer analyzer) 132var completedAnalyzers = new HashSet<DiagnosticAnalyzer> { analyzer }; 160public ImmutableArray<DiagnosticAnalyzer> GetPendingAnalyzers(ImmutableArray<DiagnosticAnalyzer> analyzers, (SourceOrAdditionalFile file, bool syntax)? filterScope) 188public void ApplySuppressionsAndStoreAnalysisResult(AnalysisScope analysisScope, AnalyzerDriver driver, Compilation compilation, Func<DiagnosticAnalyzer, AnalyzerActionCounts> getAnalyzerActionCounts, CancellationToken cancellationToken) 190foreach (var analyzer in analysisScope.Analyzers) 328DiagnosticAnalyzer analyzer, 332ref Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics) 340lazyLocalDiagnostics = lazyLocalDiagnostics ?? new Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>(); 350Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? allDiagnostics; 353allDiagnostics = new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>(); 368private void UpdateNonLocalDiagnostics_NoLock(DiagnosticAnalyzer analyzer, ImmutableArray<Diagnostic> diagnostics, bool overwrite) 375_nonLocalDiagnosticsOpt = _nonLocalDiagnosticsOpt ?? new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>(); 443Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics, 458Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 464Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 470Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 472ImmutableArray<DiagnosticAnalyzer> analyzers, 476Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? diagnosticsForTree; 484Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder> diagnostics, 485ImmutableArray<DiagnosticAnalyzer> analyzers, 490foreach (var analyzer in analyzers) 500internal AnalysisResult ToAnalysisResult(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalysisScope analysisScope, CancellationToken cancellationToken) 504ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSyntaxDiagnostics; 505ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSemanticDiagnostics; 506ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localAdditionalFileDiagnostics; 507ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics; 524private static ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> GetImmutable<TKey>( 525ImmutableHashSet<DiagnosticAnalyzer> analyzers, 527Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnosticsOpt) 532return ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>.Empty; 535var builder = ImmutableDictionary.CreateBuilder<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>(); 536var perTreeBuilder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>(); 560private static ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> GetImmutable( 561ImmutableHashSet<DiagnosticAnalyzer> analyzers, 563Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? nonLocalDiagnosticsOpt) 567return ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty; 570var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>(); 586private ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> GetTelemetryInfo( 587ImmutableArray<DiagnosticAnalyzer> analyzers) 589var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, AnalyzerTelemetryInfo>(); 593foreach (var analyzer in analyzers)
DiagnosticAnalyzer\AnalysisScope.cs (15)
23private readonly Lazy<ImmutableHashSet<DiagnosticAnalyzer>> _lazyAnalyzersSet; 50public ImmutableArray<DiagnosticAnalyzer> Analyzers { get; } 77/// This flag is used to improve the performance for <see cref="Contains(DiagnosticAnalyzer)"/> check for 96public static AnalysisScope Create(Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzers compilationWithAnalyzers) 104public static AnalysisScope CreateForBatchCompile(Compilation compilation, AnalyzerOptions analyzerOptions, ImmutableArray<DiagnosticAnalyzer> analyzers) 109private static AnalysisScope Create(Compilation compilation, AnalyzerOptions? analyzerOptions, ImmutableArray<DiagnosticAnalyzer> analyzers, bool hasAllAnalyzers, bool concurrentAnalysis) 118public static AnalysisScope Create(ImmutableArray<DiagnosticAnalyzer> analyzers, SourceOrAdditionalFile filterFile, TextSpan? filterSpan, bool isSyntacticSingleFileAnalysis, CompilationWithAnalyzers compilationWithAnalyzers) 121public static AnalysisScope Create(ImmutableArray<DiagnosticAnalyzer> analyzers, SourceOrAdditionalFile filterFile, TextSpan? filterSpan, SourceOrAdditionalFile originalFilterFile, TextSpan? originalFilterSpan, bool isSyntacticSingleFileAnalysis, CompilationWithAnalyzers compilationWithAnalyzers) 133ImmutableArray<DiagnosticAnalyzer> analyzers, 155_lazyAnalyzersSet = new Lazy<ImmutableHashSet<DiagnosticAnalyzer>>(CreateAnalyzersSet); 179private ImmutableHashSet<DiagnosticAnalyzer> CreateAnalyzersSet() => Analyzers.ToImmutableHashSet(); 181public bool Contains(DiagnosticAnalyzer analyzer) 192public AnalysisScope WithAnalyzers(ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzers compilationWithAnalyzers) 198private static bool ComputeHasAllAnalyzers(ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzers compilationWithAnalyzers) 201foreach (var analyzer in analyzers)
DiagnosticAnalyzer\AnalyzerDriver.cs (120)
35private static readonly Func<DiagnosticAnalyzer, bool> s_IsCompilerAnalyzerFunc = IsCompilerAnalyzer; 62protected ImmutableArray<DiagnosticAnalyzer> Analyzers { get; } 92private ImmutableHashSet<DiagnosticAnalyzer>? _lazyUnsuppressedAnalyzers; 97protected ImmutableHashSet<DiagnosticAnalyzer> UnsuppressedAnalyzers 106private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>? _lazyPerSymbolAnalyzerActionsCache; 114private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions> PerSymbolAnalyzerActionsCache 123private ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>)> _lazySymbolActionsByKind; 124private ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<SemanticModelAnalyzerAction>)> _lazySemanticModelActions; 125private ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<SyntaxTreeAnalyzerAction>)> _lazySyntaxTreeActions; 126private ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<AdditionalFileAnalyzerAction>)> _lazyAdditionalFileActions; 129private ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<CompilationAnalyzerAction>)> _lazyCompilationActions; 130private ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<CompilationAnalyzerAction>)> _lazyCompilationEndActions; 132private ImmutableHashSet<DiagnosticAnalyzer>? _lazyCompilationEndAnalyzers; 133private ImmutableHashSet<DiagnosticAnalyzer> CompilationEndAnalyzers 154private ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim> _lazyAnalyzerGateMap; 155private ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim> AnalyzerGateMap 164private ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> _lazyGeneratedCodeAnalysisFlagsMap; 169private ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> GeneratedCodeAnalysisFlagsMap 184private ImmutableHashSet<DiagnosticAnalyzer>? _lazyNonConfigurableAndCustomConfigurableAnalyzers; 189private ImmutableHashSet<DiagnosticAnalyzer> NonConfigurableAndCustomConfigurableAnalyzers 198private ImmutableHashSet<DiagnosticAnalyzer>? _lazySymbolStartAnalyzers; 203private ImmutableHashSet<DiagnosticAnalyzer> SymbolStartAnalyzers 259private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>? _lazySuppressedAnalyzersForTreeMap; 264private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>> SuppressedAnalyzersForTreeMap 369protected AnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerManager analyzerManager, SeverityFilter severityFilter, Func<SyntaxTrivia, bool> isComment) 381_lazyAnalyzerGateMap = ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>.Empty; 420_lazySuppressedAnalyzersForTreeMap = new ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>(); 433_lazyPerSymbolAnalyzerActionsCache = new ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>(); 475Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? addCategorizedLocalDiagnostic = null; 476Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? addCategorizedNonLocalDiagnostic = null; 488Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> newOnAnalyzerException = (ex, analyzer, diagnostic, cancellationToken) => 517private SemaphoreSlim? GetAnalyzerGate(DiagnosticAnalyzer analyzer) 529private ImmutableHashSet<DiagnosticAnalyzer> ComputeNonConfigurableAndCustomConfigurableAnalyzers(ImmutableHashSet<DiagnosticAnalyzer> unsuppressedAnalyzers, CancellationToken cancellationToken) 531var builder = ImmutableHashSet.CreateBuilder<DiagnosticAnalyzer>(); 532foreach (var analyzer in unsuppressedAnalyzers) 548private ImmutableHashSet<DiagnosticAnalyzer> ComputeSymbolStartAnalyzers(ImmutableHashSet<DiagnosticAnalyzer> unsuppressedAnalyzers) 550var builder = ImmutableHashSet.CreateBuilder<DiagnosticAnalyzer>(); 563ImmutableHashSet<DiagnosticAnalyzer> analyzers, 564ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> generatedCodeAnalysisFlagsMap, 567foreach (var analyzer in analyzers) 581private static bool ComputeShouldTreatAllCodeAsNonGeneratedCode(ImmutableHashSet<DiagnosticAnalyzer> analyzers, ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> generatedCodeAnalysisFlagsMap) 583foreach (var analyzer in analyzers) 597private bool ShouldSkipAnalysisOnGeneratedCode(DiagnosticAnalyzer analyzer) 601DiagnosticAnalyzer analyzer, 602ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> generatedCodeAnalysisFlagsMap, 614private bool ShouldSuppressGeneratedCodeDiagnostic(Diagnostic diagnostic, DiagnosticAnalyzer analyzer, Compilation compilation, CancellationToken cancellationToken) 714private static void OnDriverException(Task faultedTask, AnalyzerExecutor analyzerExecutor, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 728var analyzer = analyzers[0]; 812ImmutableArray<DiagnosticAnalyzer> analyzers, 822Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = 832ImmutableArray<DiagnosticAnalyzer> analyzers, 835Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException, 900foreach (var analyzer in Analyzers) 1177public ImmutableArray<Diagnostic> DequeueLocalDiagnosticsAndApplySuppressions(DiagnosticAnalyzer analyzer, bool syntax, Compilation compilation, CancellationToken cancellationToken) 1183public ImmutableArray<Diagnostic> DequeueNonLocalDiagnosticsAndApplySuppressions(DiagnosticAnalyzer analyzer, Compilation compilation, CancellationToken cancellationToken) 1353private bool IsAnalyzerSuppressedForTree(DiagnosticAnalyzer analyzer, SyntaxTree tree, SyntaxTreeOptionsProvider? options, CancellationToken cancellationToken) 1363private ImmutableHashSet<DiagnosticAnalyzer> ComputeSuppressedAnalyzersForTree(SyntaxTree tree, SyntaxTreeOptionsProvider? options, CancellationToken cancellationToken) 1367return ImmutableHashSet<DiagnosticAnalyzer>.Empty; 1370ImmutableHashSet<DiagnosticAnalyzer>.Builder? suppressedAnalyzersBuilder = null; 1371foreach (var analyzer in UnsuppressedAnalyzers) 1414suppressedAnalyzersBuilder ??= ImmutableHashSet.CreateBuilder<DiagnosticAnalyzer>(); 1419return suppressedAnalyzersBuilder != null ? suppressedAnalyzersBuilder.ToImmutable() : ImmutableHashSet<DiagnosticAnalyzer>.Empty; 1448internal ImmutableDictionary<DiagnosticAnalyzer, TimeSpan> AnalyzerExecutionTimes => AnalyzerExecutor.AnalyzerExecutionTimes; 1449internal TimeSpan ResetAnalyzerExecutionTime(DiagnosticAnalyzer analyzer) => AnalyzerExecutor.ResetAnalyzerExecutionTime(analyzer); 1451private static ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>)> MakeSymbolActionsByKind(in AnalyzerActions analyzerActions) 1453var builder = ArrayBuilder<(DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>)>.GetInstance(); 1482private static ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<TAnalyzerAction>)> MakeActionsByAnalyzer<TAnalyzerAction>(in ImmutableArray<TAnalyzerAction> analyzerActions) 1485var builder = ArrayBuilder<(DiagnosticAnalyzer, ImmutableArray<TAnalyzerAction>)>.GetInstance(); 1495private static ImmutableHashSet<DiagnosticAnalyzer> MakeCompilationEndAnalyzers(ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<CompilationAnalyzerAction>)> compilationEndActionsByAnalyzer) 1497var builder = ImmutableHashSet.CreateBuilder<DiagnosticAnalyzer>(); 1636ImmutableArray<DiagnosticAnalyzer> processedAnalyzers; 1654private async Task OnEventProcessedCoreAsync(CompilationEvent compilationEvent, ImmutableArray<DiagnosticAnalyzer> processedAnalyzers, AnalysisScope analysisScope, CancellationToken cancellationToken) 1661foreach (var analyzer in processedAnalyzers) 1683async Task onSymbolAndMembersProcessedAsync(ISymbol symbol, DiagnosticAnalyzer analyzer) 1701async Task processContainerOnMemberCompletedAsync(INamespaceOrTypeSymbol containerSymbol, ISymbol processedMemberSymbol, DiagnosticAnalyzer analyzer) 1813out ImmutableArray<DiagnosticAnalyzer> subsetProcessedAnalyzers) 1821subsetProcessedAnalyzers = ImmutableArray<DiagnosticAnalyzer>.Empty; 1826var completedAnalyzers = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 1827var processedAnalyzers = PooledHashSet<DiagnosticAnalyzer>.GetInstance(); 1832var analyzer = groupedActions.Key; 1854foreach (var analyzer in analysisScope.Analyzers) 1872subsetProcessedAnalyzers = ImmutableArray<DiagnosticAnalyzer>.Empty; 1937ImmutableArray<(DiagnosticAnalyzer, ImmutableArray<CompilationAnalyzerAction>)> compilationActionsMap, 1967internal static Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken> GetDiagnosticSink(Action<Diagnostic, DiagnosticAnalyzer, bool> addLocalDiagnosticCore, Compilation compilation, AnalyzerOptions? analyzerOptions, SeverityFilter severityFilter, ConcurrentSet<string>? suppressedDiagnosticIds) 1979internal static Action<Diagnostic, DiagnosticAnalyzer, CancellationToken> GetDiagnosticSink(Action<Diagnostic, DiagnosticAnalyzer> addDiagnosticCore, Compilation compilation, AnalyzerOptions? analyzerOptions, SeverityFilter severityFilter, ConcurrentSet<string>? suppressedDiagnosticIds) 2021private static async Task<(AnalyzerActions actions, ImmutableHashSet<DiagnosticAnalyzer> unsuppressedAnalyzers)> GetAnalyzerActionsAsync( 2022ImmutableArray<DiagnosticAnalyzer> analyzers, 2030var unsuppressedAnalyzersBuilder = PooledHashSet<DiagnosticAnalyzer>.GetInstance(); 2031foreach (var analyzer in analyzers) 2064var analyzer = analysisScope.Analyzers[0]; 2077var symbolStartAnalyzers = PooledHashSet<DiagnosticAnalyzer>.GetInstance(); 2085foreach (var analyzer in analysisScope.Analyzers) 2115foreach (var analyzer in analysisScope.Analyzers) 2137DiagnosticAnalyzer analyzer, 2165async ValueTask<IGroupedAnalyzerActions> getAllActionsAsync(AnalyzerDriver driver, ISymbol symbol, DiagnosticAnalyzer analyzer, SyntaxTree? filterTree, TextSpan? filterSpan, CancellationToken cancellationToken) 2181async ValueTask<IGroupedAnalyzerActions> getInheritedActionsAsync(AnalyzerDriver driver, ISymbol symbol, DiagnosticAnalyzer analyzer, SyntaxTree? filterTree, TextSpan? filterSpan, CancellationToken cancellationToken) 2205static async ValueTask<AnalyzerActions> getSymbolActionsCoreAsync(AnalyzerDriver driver, ISymbol symbol, DiagnosticAnalyzer analyzer, SyntaxTree? filterTree, TextSpan? filterSpan, CancellationToken cancellationToken) 2222private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>> CreateAnalyzerGateMapAsync( 2223ImmutableHashSet<DiagnosticAnalyzer> analyzers, 2230var builder = ImmutableSegmentedDictionary.CreateBuilder<DiagnosticAnalyzer, SemaphoreSlim>(); 2231foreach (var analyzer in analyzers) 2247private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags>> CreateGeneratedCodeAnalysisFlagsMapAsync( 2248ImmutableHashSet<DiagnosticAnalyzer> analyzers, 2255var builder = ImmutableSegmentedDictionary.CreateBuilder<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags>(); 2256foreach (var analyzer in analyzers) 2356internal async Task<AnalyzerActionCounts> GetAnalyzerActionCountsAsync(DiagnosticAnalyzer analyzer, CompilationOptions compilationOptions, AnalysisScope analysisScope, CancellationToken cancellationToken) 2376DiagnosticAnalyzer analyzer, 2387internal static bool IsCompilerAnalyzer(DiagnosticAnalyzer analyzer) => analyzer is CompilerDiagnosticAnalyzer; 2414internal AnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, Func<SyntaxNode, TLanguageKindEnum> getKind, AnalyzerManager analyzerManager, SeverityFilter severityFilter, Func<SyntaxTrivia, bool> isComment) 2486protected override IGroupedAnalyzerActions CreateGroupedActions(DiagnosticAnalyzer analyzer, in AnalyzerActions analyzerActions) 2617var analyzersForNodes = PooledHashSet<DiagnosticAnalyzer>.GetInstance(); 2622foreach (var analyzer in analyzersForKind) 2662DiagnosticAnalyzer analyzer, 2741var analyzer = this.Analyzers[0];
DiagnosticAnalyzer\AnalyzerDriver.EventProcessedState.cs (3)
25public ImmutableArray<DiagnosticAnalyzer> SubsetProcessedAnalyzers { get; } 33private EventProcessedState(ImmutableArray<DiagnosticAnalyzer> subsetProcessedAnalyzers) 39public static EventProcessedState CreatePartiallyProcessed(ImmutableArray<DiagnosticAnalyzer> subsetProcessedAnalyzers)
DiagnosticAnalyzer\AnalyzerDriver.ExecutableCodeBlockAnalyzerActions.cs (1)
15public DiagnosticAnalyzer Analyzer;
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActions.cs (13)
18/// <see cref="AnalyzerActions"/> grouped by <see cref="DiagnosticAnalyzer"/>, and possibly other entities, such as <see cref="OperationKind"/>, <see cref="SymbolKind"/>, etc. 23ImmutableArray<(DiagnosticAnalyzer, GroupedAnalyzerActionsForAnalyzer)>.Empty, 24ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>>.Empty, 28ImmutableArray<(DiagnosticAnalyzer, GroupedAnalyzerActionsForAnalyzer)> groupedActionsAndAnalyzers, 29ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>> analyzersByKind, 37public ImmutableArray<(DiagnosticAnalyzer analyzer, GroupedAnalyzerActionsForAnalyzer groupedActions)> GroupedActionsByAnalyzer { get; } 39public ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>> AnalyzersByKind { get; } 53public static GroupedAnalyzerActions Create(DiagnosticAnalyzer analyzer, in AnalyzerActions analyzerActions) 61var groupedActionsAndAnalyzers = ImmutableArray<(DiagnosticAnalyzer, GroupedAnalyzerActionsForAnalyzer)>.Empty.Add((analyzer, groupedActions)); 66public static GroupedAnalyzerActions Create(ImmutableArray<DiagnosticAnalyzer> analyzers, in AnalyzerActions analyzerActions) 94private static ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>> CreateAnalyzersByKind(ImmutableArray<(DiagnosticAnalyzer, GroupedAnalyzerActionsForAnalyzer)> groupedActionsAndAnalyzers) 96var analyzersByKind = PooledDictionary<TLanguageKindEnum, ArrayBuilder<DiagnosticAnalyzer>>.GetInstance();
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActionsForAnalyzer.cs (5)
16private readonly DiagnosticAnalyzer _analyzer; 28public GroupedAnalyzerActionsForAnalyzer(DiagnosticAnalyzer analyzer, in AnalyzerActions analyzerActions, bool analyzerActionsNeedFiltering) 40private static void VerifyActions<TAnalyzerAction>(ArrayBuilder<TAnalyzerAction> actions, DiagnosticAnalyzer analyzer) 59DiagnosticAnalyzer analyzer, 153DiagnosticAnalyzer analyzer,
DiagnosticAnalyzer\AnalyzerDriver.IGroupedAnalyzerActions.cs (1)
10protected abstract IGroupedAnalyzerActions CreateGroupedActions(DiagnosticAnalyzer analyzer, in AnalyzerActions analyzerActions);
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (8)
31DiagnosticAnalyzer analyzer, 34Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? addCategorizedLocalDiagnostic, 35Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? addCategorizedNonLocalDiagnostic, 36Func<Diagnostic, DiagnosticAnalyzer, Compilation, CancellationToken, bool> shouldSuppressGeneratedCodeDiagnostic, 70private DiagnosticAnalyzer _analyzer; 73private Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? _addCategorizedLocalDiagnostic; 74private Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? _addCategorizedNonLocalDiagnostic; 75private Func<Diagnostic, DiagnosticAnalyzer, Compilation, CancellationToken, bool> _shouldSuppressGeneratedCodeDiagnostic;
DiagnosticAnalyzer\AnalyzerExecutor.cs (65)
35private readonly Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? _addCategorizedLocalDiagnostic; 36private readonly Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? _addCategorizedNonLocalDiagnostic; 40private readonly Func<DiagnosticAnalyzer, bool> _isCompilerAnalyzer; 41private readonly Func<DiagnosticAnalyzer, object?> _getAnalyzerGate; 43private readonly Func<DiagnosticAnalyzer, bool> _shouldSkipAnalysisOnGeneratedCode; 44private readonly Func<Diagnostic, DiagnosticAnalyzer, Compilation, CancellationToken, bool> _shouldSuppressGeneratedCodeDiagnostic; 46private readonly Func<DiagnosticAnalyzer, SyntaxTree, SyntaxTreeOptionsProvider?, CancellationToken, bool> _isAnalyzerSuppressedForTree; 51private readonly ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>? _analyzerExecutionTimeMap; 61private bool IsAnalyzerSuppressedForTree(DiagnosticAnalyzer analyzer, SyntaxTree tree, CancellationToken cancellationToken) 102Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException, 104Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 106Func<DiagnosticAnalyzer, bool> shouldSkipAnalysisOnGeneratedCode, 107Func<Diagnostic, DiagnosticAnalyzer, Compilation, CancellationToken, bool> shouldSuppressGeneratedCodeDiagnostic, 109Func<DiagnosticAnalyzer, SyntaxTree, SyntaxTreeOptionsProvider?, CancellationToken, bool> isAnalyzerSuppressedForTree, 110Func<DiagnosticAnalyzer, object?> getAnalyzerGate, 114Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? addCategorizedLocalDiagnostic = null, 115Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? addCategorizedNonLocalDiagnostic = null, 122var analyzerExecutionTimeMap = logExecutionTime ? new ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>() : null; 134Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException, 136Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 138Func<DiagnosticAnalyzer, bool> shouldSkipAnalysisOnGeneratedCode, 139Func<Diagnostic, DiagnosticAnalyzer, Compilation, CancellationToken, bool> shouldSuppressGeneratedCodeDiagnostic, 141Func<DiagnosticAnalyzer, SyntaxTree, SyntaxTreeOptionsProvider?, CancellationToken, bool> isAnalyzerSuppressedForTree, 142Func<DiagnosticAnalyzer, object?> getAnalyzerGate, 145ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>? analyzerExecutionTimeMap, 146Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? addCategorizedLocalDiagnostic, 147Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? addCategorizedNonLocalDiagnostic, 178internal Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> OnAnalyzerException { get; } 180internal ImmutableDictionary<DiagnosticAnalyzer, TimeSpan> AnalyzerExecutionTimes 190/// Executes the <see cref="DiagnosticAnalyzer.Initialize(AnalysisContext)"/> for the given analyzer. 323DiagnosticAnalyzer analyzer, 365DiagnosticAnalyzer analyzer, 426DiagnosticAnalyzer analyzer, 462DiagnosticAnalyzer analyzer, 479DiagnosticAnalyzer analyzer, 530DiagnosticAnalyzer analyzer, 580DiagnosticAnalyzer analyzer, 632DiagnosticAnalyzer analyzer, 716DiagnosticAnalyzer analyzer, 722public readonly DiagnosticAnalyzer Analyzer = analyzer; 736DiagnosticAnalyzer analyzer, 839DiagnosticAnalyzer analyzer, 998DiagnosticAnalyzer analyzer, 1099DiagnosticAnalyzer analyzer, 1189internal void ExecuteAndCatchIfThrows<TArg>(DiagnosticAnalyzer analyzer, Action<TArg> analyze, TArg argument, AnalysisContextInfo? contextInfo, CancellationToken cancellationToken) 1223private void ExecuteAndCatchIfThrows_NoLock<TArg>(DiagnosticAnalyzer analyzer, Action<TArg> analyze, TArg argument, AnalysisContextInfo? info, CancellationToken cancellationToken) 1236private bool HandleAnalyzerException(DiagnosticAnalyzer analyzer, Exception ex, in AnalysisContextInfo? info) 1250DiagnosticAnalyzer analyzer, 1252Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException, 1290internal static Diagnostic CreateAnalyzerExceptionDiagnostic(DiagnosticAnalyzer analyzer, Exception e, AnalysisContextInfo? info = null) 1312private static string CreateDisablingMessage(DiagnosticAnalyzer analyzer, string analyzerName) 1404private bool IsSupportedDiagnostic(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, CancellationToken cancellationToken) 1415private Action<Diagnostic> GetAddDiagnostic(ISymbol contextSymbol, ImmutableArray<SyntaxReference> cachedDeclaringReferences, DiagnosticAnalyzer analyzer, Func<ISymbol, SyntaxReference, Compilation, CancellationToken, SyntaxNode> getTopMostNodeForAnalysis, CancellationToken cancellationToken) 1425DiagnosticAnalyzer analyzer, 1427Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken>? addCategorizedLocalDiagnostic, 1428Action<Diagnostic, DiagnosticAnalyzer, CancellationToken>? addCategorizedNonLocalDiagnostic, 1430Func<Diagnostic, DiagnosticAnalyzer, Compilation, CancellationToken, bool> shouldSuppressGeneratedCodeDiagnostic, 1470private Action<Diagnostic> GetAddCompilationDiagnostic(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1490private AnalyzerDiagnosticReporter GetAddSemanticDiagnostic(SyntaxTree tree, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1497private AnalyzerDiagnosticReporter GetAddSemanticDiagnostic(SyntaxTree tree, TextSpan? span, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1504private AnalyzerDiagnosticReporter GetAddSyntaxDiagnostic(SourceOrAdditionalFile file, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1511private bool ShouldExecuteNode(SyntaxNode node, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1523private bool ShouldExecuteOperation(IOperation operation, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1535internal TimeSpan ResetAnalyzerExecutionTime(DiagnosticAnalyzer analyzer) 1558private bool IsAnalyzerSuppressedForSymbol(DiagnosticAnalyzer analyzer, ISymbol symbol, CancellationToken cancellationToken)
DiagnosticAnalyzer\AnalyzerFileReference.cs (6)
39private readonly Extensions<DiagnosticAnalyzer> _diagnosticAnalyzers; 112public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() 119public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 188/// Adds the <see cref="ImmutableArray{T}"/> of <see cref="DiagnosticAnalyzer"/> defined in this assembly reference of given <paramref name="language"/>. 190internal void AddAnalyzers(ImmutableArray<DiagnosticAnalyzer>.Builder builder, string language, Func<DiagnosticAnalyzer, bool>? shouldInclude = null)
DiagnosticAnalyzer\AnalyzerImageReference.cs (4)
19private readonly ImmutableArray<DiagnosticAnalyzer> _analyzers; 24public AnalyzerImageReference(ImmutableArray<DiagnosticAnalyzer> analyzers, string? fullPath = null, string? display = null) 37public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() 42public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language)
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (9)
27private readonly DiagnosticAnalyzer _analyzer; 66public AnalyzerExecutionContext(DiagnosticAnalyzer analyzer) 249public ImmutableArray<DiagnosticDescriptor> GetOrComputeDiagnosticDescriptors(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 257Func<DiagnosticAnalyzer, AnalyzerExecutor, CancellationToken, ImmutableArray<TDescriptor>> computeDescriptorsNoLock, 258DiagnosticAnalyzer analyzer, 285/// Compute <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> and exception handler for the given <paramref name="analyzer"/>. 288DiagnosticAnalyzer analyzer, 307throw new ArgumentException(string.Format(CodeAnalysisResources.SupportedDiagnosticsHasNullDescriptor, analyzer.ToString()), nameof(DiagnosticAnalyzer.SupportedDiagnostics)); 366DiagnosticAnalyzer analyzer,
DiagnosticAnalyzer\AnalyzerManager.cs (31)
23/// 1) <see cref="DiagnosticAnalyzer.Initialize(AnalysisContext)"/> is invoked only once per-analyzer. 24/// 2) <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> is invoked only once per-analyzer. 31private readonly Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext> _analyzerExecutionContextMap; 33public AnalyzerManager(ImmutableArray<DiagnosticAnalyzer> analyzers) 38public AnalyzerManager(DiagnosticAnalyzer analyzer) 43private Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext> CreateAnalyzerExecutionContextMap(IEnumerable<DiagnosticAnalyzer> analyzers) 45var analyzerExecutionContextMap = new Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext>(); 46foreach (var analyzer in analyzers) 54private AnalyzerExecutionContext GetAnalyzerExecutionContext(DiagnosticAnalyzer analyzer) => _analyzerExecutionContextMap[analyzer]; 97DiagnosticAnalyzer analyzer, 133DiagnosticAnalyzer analyzer, 165/// The returned actions include the actions registered during <see cref="DiagnosticAnalyzer.Initialize(AnalysisContext)"/> method as well as 169public async ValueTask<AnalyzerActions> GetAnalyzerActionsAsync(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 191DiagnosticAnalyzer analyzer, 234public async Task<bool> IsConcurrentAnalyzerAsync(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 244public async Task<GeneratedCodeAnalysisFlags> GetGeneratedCodeAnalysisFlagsAsync(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 251/// Return <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> of given <paramref name="analyzer"/>. 254DiagnosticAnalyzer analyzer, 274internal bool IsSupportedDiagnostic(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 300DiagnosticAnalyzer analyzer, 302Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 308Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = 342DiagnosticAnalyzer analyzer, 344Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 347Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors, 468DiagnosticAnalyzer analyzer, 474public bool TryStartExecuteSymbolEndActions(ImmutableArray<SymbolEndAnalyzerAction> symbolEndActions, DiagnosticAnalyzer analyzer, SymbolDeclaredCompilationEvent symbolDeclaredEvent) 481DiagnosticAnalyzer analyzer, 488public void MarkSymbolEndAnalysisComplete(ISymbol symbol, DiagnosticAnalyzer analyzer)
DiagnosticAnalyzer\AnalyzerOptions.cs (3)
13/// Options passed to <see cref="DiagnosticAnalyzer"/>. 30/// Creates analyzer options to be passed to <see cref="DiagnosticAnalyzer"/>. 46/// Creates analyzer options to be passed to <see cref="DiagnosticAnalyzer"/>.
DiagnosticAnalyzer\AnalyzerReference.cs (2)
56public abstract ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages(); 62public abstract ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language);
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (52)
28private readonly ImmutableArray<DiagnosticAnalyzer> _analyzers; 54public ImmutableArray<DiagnosticAnalyzer> Analyzers => _analyzers; 69/// <inheritdoc cref="CompilationWithAnalyzers(Compilation, ImmutableArray{DiagnosticAnalyzer}, AnalyzerOptions?)"/> 72public CompilationWithAnalyzers(Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions? options, CancellationToken cancellationToken) 83public CompilationWithAnalyzers(Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions? options) 94public CompilationWithAnalyzers(Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersOptions analysisOptions) 113private static void VerifyArguments(Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersOptions analysisOptions) 128private static void VerifyAnalyzersArgumentForStaticApis(ImmutableArray<DiagnosticAnalyzer> analyzers, bool allowDefaultOrEmpty = false) 152private void VerifyAnalyzerArgument(DiagnosticAnalyzer analyzer) 162private static void VerifyAnalyzerArgumentForStaticApis(DiagnosticAnalyzer analyzer) 170private void VerifyExistingAnalyzersArgument(ImmutableArray<DiagnosticAnalyzer> analyzers) 253public async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 273public async Task<AnalysisResult> GetAnalysisResultAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 302async Task<ImmutableArray<Diagnostic>> getAllDiagnosticsWithoutStateTrackingAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 335public async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 342private async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 349private async Task<AnalysisResult> GetAnalysisResultCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 356private async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 427public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 445public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 488public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 505public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 535public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 569public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 577private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SourceOrAdditionalFile file, ImmutableArray<DiagnosticAnalyzer> analyzers, TextSpan? filterSpan, CancellationToken cancellationToken) 584private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsCoreAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, TextSpan? filterSpan, CancellationToken cancellationToken) 613public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 643public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 651private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 658private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 737Func<DiagnosticAnalyzer, AnalyzerActionCounts> getAnalyzerActionCounts = analyzer => analyzerActionCounts[analyzer]; 830static async Task<(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts, bool hasAnyActionsRequiringCompilationEvents)> getAnalyzerActionCountsAsync( 839var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, AnalyzerActionCounts>(); 841foreach (var analyzer in analysisScope.Analyzers) 853static (ImmutableArray<DiagnosticAnalyzer> symbolStartAnalyzers, ImmutableArray<DiagnosticAnalyzer> otherAnalyzers) getSymbolStartAnalyzers( 854ImmutableArray<DiagnosticAnalyzer> analyzers, 855ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts) 857var symbolStartAnalyzersBuilder = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 858var otherAnalyzersBuilder = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 860foreach (var analyzer in analyzers) 879ImmutableArray<DiagnosticAnalyzer> symbolStartAnalyzers, 1151/// Given a set of compiler or <see cref="DiagnosticAnalyzer"/> generated <paramref name="diagnostics"/>, returns the effective diagnostics after applying the below filters: 1161/// Given a set of compiler or <see cref="DiagnosticAnalyzer"/> generated <paramref name="diagnostics"/>, returns the effective diagnostics after applying the below filters: 1219DiagnosticAnalyzer analyzer, 1221Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException = null) 1232Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> wrappedOnAnalyzerException = 1235Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = analyzer => 1269public static void ClearAnalyzerState(ImmutableArray<DiagnosticAnalyzer> analyzers) 1276public async Task<AnalyzerTelemetryInfo> GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1296private async Task<AnalyzerActionCounts> GetAnalyzerActionCountsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1307private TimeSpan GetAnalyzerExecutionTime(DiagnosticAnalyzer analyzer)
DiagnosticAnalyzer\CompilationWithAnalyzersOptions.cs (6)
15private readonly Action<Exception, DiagnosticAnalyzer, Diagnostic>? _onAnalyzerException; 22/// Options passed to <see cref="DiagnosticAnalyzer"/>s. 29public Action<Exception, DiagnosticAnalyzer, Diagnostic>? OnAnalyzerException => _onAnalyzerException; 60Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException, 77Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException, 96Action<Exception, DiagnosticAnalyzer, Diagnostic>? onAnalyzerException,
DiagnosticAnalyzer\DiagnosticAnalyzerAction.cs (16)
13internal DiagnosticAnalyzer Analyzer { get; } 15internal AnalyzerAction(DiagnosticAnalyzer analyzer) 26public SymbolAnalyzerAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> kinds, DiagnosticAnalyzer analyzer) 39public SymbolStartAnalyzerAction(Action<SymbolStartAnalysisContext> action, SymbolKind kind, DiagnosticAnalyzer analyzer) 51public SymbolEndAnalyzerAction(Action<SymbolAnalysisContext> action, DiagnosticAnalyzer analyzer) 63public SyntaxNodeAnalyzerAction(Action<SyntaxNodeAnalysisContext> action, ImmutableArray<TLanguageKindEnum> kinds, DiagnosticAnalyzer analyzer) 75public OperationBlockStartAnalyzerAction(Action<OperationBlockStartAnalysisContext> action, DiagnosticAnalyzer analyzer) 86public OperationBlockAnalyzerAction(Action<OperationBlockAnalysisContext> action, DiagnosticAnalyzer analyzer) 98public OperationAnalyzerAction(Action<OperationAnalysisContext> action, ImmutableArray<OperationKind> kinds, DiagnosticAnalyzer analyzer) 110public CompilationStartAnalyzerAction(Action<CompilationStartAnalysisContext> action, DiagnosticAnalyzer analyzer) 121public CompilationAnalyzerAction(Action<CompilationAnalysisContext> action, DiagnosticAnalyzer analyzer) 132public SemanticModelAnalyzerAction(Action<SemanticModelAnalysisContext> action, DiagnosticAnalyzer analyzer) 143public SyntaxTreeAnalyzerAction(Action<SyntaxTreeAnalysisContext> action, DiagnosticAnalyzer analyzer) 154public AdditionalFileAnalyzerAction(Action<AdditionalFileAnalysisContext> action, DiagnosticAnalyzer analyzer) 165public CodeBlockStartAnalyzerAction(Action<CodeBlockStartAnalysisContext<TLanguageKindEnum>> action, DiagnosticAnalyzer analyzer) 176public CodeBlockAnalyzerAction(Action<CodeBlockAnalysisContext> action, DiagnosticAnalyzer analyzer)
DiagnosticAnalyzer\DiagnosticAnalyzerExtensions.cs (4)
14/// <inheritdoc cref="WithAnalyzers(Compilation, ImmutableArray{DiagnosticAnalyzer}, AnalyzerOptions?)"/> 17public static CompilationWithAnalyzers WithAnalyzers(this Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions? options, CancellationToken cancellationToken) 29public static CompilationWithAnalyzers WithAnalyzers(this Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions? options = null) 41public static CompilationWithAnalyzers WithAnalyzers(this Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersOptions analysisOptions)
DiagnosticAnalyzer\DiagnosticQueue.cs (28)
24public abstract void EnqueueLocal(Diagnostic diagnostic, DiagnosticAnalyzer analyzer, bool isSyntaxDiagnostic); 25public abstract void EnqueueNonLocal(Diagnostic diagnostic, DiagnosticAnalyzer analyzer); 26public abstract ImmutableArray<Diagnostic> DequeueLocalSyntaxDiagnostics(DiagnosticAnalyzer analyzer); 27public abstract ImmutableArray<Diagnostic> DequeueLocalSemanticDiagnostics(DiagnosticAnalyzer analyzer); 28public abstract ImmutableArray<Diagnostic> DequeueNonLocalDiagnostics(DiagnosticAnalyzer analyzer); 58public override void EnqueueLocal(Diagnostic diagnostic, DiagnosticAnalyzer analyzer, bool isSyntaxDiagnostic) 63public override void EnqueueNonLocal(Diagnostic diagnostic, DiagnosticAnalyzer analyzer) 68public override ImmutableArray<Diagnostic> DequeueLocalSemanticDiagnostics(DiagnosticAnalyzer analyzer) 73public override ImmutableArray<Diagnostic> DequeueLocalSyntaxDiagnostics(DiagnosticAnalyzer analyzer) 78public override ImmutableArray<Diagnostic> DequeueNonLocalDiagnostics(DiagnosticAnalyzer analyzer) 100private Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? _lazyLocalSemanticDiagnostics; 101private Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? _lazyLocalSyntaxDiagnostics; 102private Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? _lazyNonLocalDiagnostics; 109public override void EnqueueLocal(Diagnostic diagnostic, DiagnosticAnalyzer analyzer, bool isSyntaxDiagnostic) 122public override void EnqueueNonLocal(Diagnostic diagnostic, DiagnosticAnalyzer analyzer) 128[NotNull] ref Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap, 130DiagnosticAnalyzer analyzer) 134lazyDiagnosticsMap ??= new Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>(); 139private static void EnqueueCore_NoLock(Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, Diagnostic diagnostic, DiagnosticAnalyzer analyzer) 171private static bool TryDequeue_NoLock(Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap, [NotNullWhen(returnValue: true)] out Diagnostic? d) 185public override ImmutableArray<Diagnostic> DequeueLocalSyntaxDiagnostics(DiagnosticAnalyzer analyzer) 190public override ImmutableArray<Diagnostic> DequeueLocalSemanticDiagnostics(DiagnosticAnalyzer analyzer) 195public override ImmutableArray<Diagnostic> DequeueNonLocalDiagnostics(DiagnosticAnalyzer analyzer) 200private ImmutableArray<Diagnostic> DequeueDiagnosticsCore(DiagnosticAnalyzer analyzer, Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap) 217DiagnosticAnalyzer analyzer, 218Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? diagnosticsMap,
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (9)
357internal sealed class HostSessionStartAnalysisScope(DiagnosticAnalyzer analyzer) 426internal sealed class HostSymbolStartAnalysisScope(DiagnosticAnalyzer analyzer) 434internal sealed class HostCodeBlockStartAnalysisScope<TLanguageKindEnum>(DiagnosticAnalyzer analyzer) where TLanguageKindEnum : struct 439private DiagnosticAnalyzer Analyzer { get; } = analyzer; 462internal sealed class HostOperationBlockStartAnalysisScope(DiagnosticAnalyzer analyzer) 467private DiagnosticAnalyzer Analyzer { get; } = analyzer; 484internal abstract class HostAnalysisScope(DiagnosticAnalyzer analyzer) 488internal DiagnosticAnalyzer Analyzer { get; } = analyzer; 841DiagnosticAnalyzer analyzer,
DiagnosticAnalyzer\UnresolvedAnalyzerReference.cs (4)
54public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() 56return ImmutableArray<DiagnosticAnalyzer>.Empty; 59public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 61return ImmutableArray<DiagnosticAnalyzer>.Empty;
Microsoft.CodeAnalysis.Analyzers (7)
MetaAnalyzers\ConfigureGeneratedCodeAnalysisAnalyzer.cs (1)
61if (method.Name != nameof(DiagnosticAnalyzer.Initialize))
MetaAnalyzers\EnableConcurrentExecutionAnalyzer.cs (1)
61if (method.Name != nameof(DiagnosticAnalyzer.Initialize))
MetaAnalyzers\Helpers\DiagnosticWellKnownNames.cs (1)
24internal const string SupportedDiagnosticsName = nameof(DiagnosticAnalyzer.SupportedDiagnostics);
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (5)
88Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 394Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 398using var _1 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var analyzersBuilder); 404foreach (var analyzer in compilationWithAnalyzers.Analyzers) 483static void AddAllDiagnostics(ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnostics, ArrayBuilder<Diagnostic> reportedDiagnostics)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (8)
src\Features\DiagnosticsTestUtilities\CodeActions\CodeFixVerifierHelper.cs (4)
20public static void VerifyStandardProperty(DiagnosticAnalyzer analyzer, AnalyzerProperty property) 41private static void VerifyMessageTitle(DiagnosticAnalyzer analyzer) 55private static void VerifyMessageDescription(DiagnosticAnalyzer analyzer) 85private static void VerifyMessageHelpLinkUri(DiagnosticAnalyzer analyzer)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2.cs (1)
15where TAnalyzer : DiagnosticAnalyzer, new()
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (1)
26where TAnalyzer : DiagnosticAnalyzer, new()
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeFixVerifier`2.cs (1)
14where TAnalyzer : DiagnosticAnalyzer, new()
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeFixVerifier`2+Test.cs (1)
26where TAnalyzer : DiagnosticAnalyzer, new()
Microsoft.CodeAnalysis.CSharp (2)
CommandLine\CSharpCompiler.cs (1)
338out ImmutableArray<DiagnosticAnalyzer> analyzers,
Compilation\CSharpCompilation.cs (1)
4801internal override AnalyzerDriver CreateAnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerManager analyzerManager, SeverityFilter severityFilter)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
25/// requirements with <see cref="DiagnosticAnalyzer"/> and "CodeRefactoringProvider".
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (67)
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddOrRemoveAccessibilityModifiersFixAllTests.cs (1)
21internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddAnonymousTypeMemberName\AddAnonymousTypeMemberNameTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddBraces\AddBracesTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddExplicitCast\AddExplicitCastTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddParameter\AddParameterTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredExpressionParenthesesTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredPatternParenthesesTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AliasAmbiguousType\AliasAmbiguousTypeTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateEnumMember\GenerateEnumMemberTests.cs (1)
20internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateConversionTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateDeconstructMethodTests.cs (1)
20internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
23internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\HideBase\HideBaseTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests_ThroughMember.cs (1)
23internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessTests.cs (1)
21internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Iterator\ChangeToIEnumerableTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.cs (1)
43internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeMethodAsynchronous\MakeMethodAsynchronousTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeRefStruct\MakeRefStructTests.cs (1)
41internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeTypeAbstract\MakeTypeAbstractTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MisplacedUsingDirectives\MisplacedUsingDirectivesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Nullable\CSharpDeclareAsNullableCodeFixTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersCompilerErrorTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchExpressionTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchStatementTests.cs (1)
20internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveInKeyword\RemoveInKeywordCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveNewModifier\RemoveNewModifierCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_FixAllTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests_FixAllTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedLocalFunction\RemoveUnusedLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
38internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyBooleanExpression\SimplifyConditionalTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpdateProjectToAllowUnsafe\UpdateProjectToAllowUnsafeTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExplicitTypeForConst\UseExplicitTypeForConstTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExpressionBodyForLambda\UseExpressionBodyForLambdasAnalyzerTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInterpolatedVerbatimString\UseInterpolatedVerbatimStringCodeFixTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseSystemHashCode\UseSystemHashCodeTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ValidateFormatString\ValidateFormatStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (11)
CommandLineTestBase.cs (2)
55internal MockCSharpCompiler CreateCSharpCompiler(string[] args, DiagnosticAnalyzer[]? analyzers = null, ISourceGenerator[]? generators = null, AnalyzerAssemblyLoader? loader = null, GeneratorDriverCache? driverCache = null, MetadataReference[]? additionalReferences = null) 60internal MockCSharpCompiler CreateCSharpCompiler(string? responseFile, string workingDirectory, string[] args, DiagnosticAnalyzer[]? analyzers = null, ISourceGenerator[]? generators = null, AnalyzerAssemblyLoader? loader = null, GeneratorDriverCache? driverCache = null, MetadataReference[]? additionalReferences = null)
CommandLineTests.cs (8)
9522? Array.Empty<DiagnosticAnalyzer>() 9523: new DiagnosticAnalyzer[] { new HiddenDiagnosticAnalyzer(), new WarningDiagnosticAnalyzer() }; 10549DiagnosticAnalyzer[] analyzers = null, 13069var analyzerAndSuppressor = new DiagnosticAnalyzer[] { analyzer, suppressor }; 13099analyzerAndSuppressor = new DiagnosticAnalyzer[] { analyzer, suppressor }; 13127var analyzerAndSuppressor = new DiagnosticAnalyzer[] { analyzer, suppressor }; 13627private void TestAnalyzerConfigRespectedCore(DiagnosticAnalyzer analyzer, DiagnosticDescriptor descriptor, ReportDiagnostic analyzerConfigSeverity, bool noWarn, bool errorlog, bool customConfigurable) 15304params DiagnosticAnalyzer[] analyzers)
SarifV2ErrorLoggerTests.cs (1)
604analyzers: new DiagnosticAnalyzer[] { new AnalyzerForErrorLogTest(), new SuppressorForErrorLogTest() });
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (22)
CodeActions\AddUsing\AbstractAddUsingTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\AddUsing\AddUsingNuGetTests.cs (1)
40internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(
CodeActions\AddUsing\AddUsingTestsWithAddImportDiagnosticProvider.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\GenerateType\GenerateTypeTests.cs (1)
29internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\GenerateType\GenerateTypeWithUnboundAnalyzerTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (9)
139analyzer.ThrowOn(typeof(DiagnosticAnalyzer).GetProperties().Single().Name); 147analyzer.ThrowOn(typeof(DiagnosticAnalyzer).GetProperties().Single().Name); 181private static void AccessSupportedDiagnostics(DiagnosticAnalyzer analyzer) 756var vsixAnalyzerReferences = new List<DiagnosticAnalyzer>(vsixAnalyzers.CastArray<DiagnosticAnalyzer>()); 757vsixAnalyzerReferences.AddRange(vsixSuppressors.CastArray<DiagnosticAnalyzer>()); 766var nugetAnalyzerReferences = new List<DiagnosticAnalyzer>(); 769nugetAnalyzerReferences.AddRange(nugetAnalyzers.As<DiagnosticAnalyzer>()); 774nugetAnalyzerReferences.AddRange(nugetSuppressors.As<DiagnosticAnalyzer>());
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\MockDiagnosticAnalyzerTests.cs (1)
49internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
Formatting\CodeCleanupTests.cs (6)
795where TAnalyzer : DiagnosticAnalyzer, new() 802where TAnalyzer : DiagnosticAnalyzer, new() 809where TAnalyzer : DiagnosticAnalyzer, new() 816var analyzer = (DiagnosticAnalyzer)new TAnalyzer(); 825var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>{
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (202)
Diagnostics\DiagnosticAnalyzerTests.cs (113)
82.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ComplainAboutX() }, null, null, 114.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ComplainAboutX() }, null, null, 174.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ComplainAboutX() }, null, null, 207.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ComplainAboutX() }, null, null, 229.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ImplicitlyDeclaredSymbolAnalyzer() }); 290.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new SyntaxAndSymbolAnalyzer() }, null, null, 555var analyzers = new DiagnosticAnalyzer[] { new CodeBlockOrSyntaxNodeAnalyzer(isCodeBlockAnalyzer: true) }; 575var analyzers = new DiagnosticAnalyzer[] { new CodeBlockOrSyntaxNodeAnalyzer(isCodeBlockAnalyzer: true) }; 595var analyzers = new DiagnosticAnalyzer[] { new CodeBlockOrSyntaxNodeAnalyzer(isCodeBlockAnalyzer: true) }; 618var analyzers = new DiagnosticAnalyzer[] { new CodeBlockOrSyntaxNodeAnalyzer(isCodeBlockAnalyzer: false) }; 638var analyzers = new DiagnosticAnalyzer[] { new MethodSymbolAnalyzer() }; 681var analyzers = new DiagnosticAnalyzer[] { new FieldDeclarationAnalyzer() }; 699var analyzers = new DiagnosticAnalyzer[] { new FieldDeclarationAnalyzer() }; 853var analyzers = new DiagnosticAnalyzer[] { analyzer }; 911var analyzers = new DiagnosticAnalyzer[] { new AnalyzerWithInvalidDiagnosticId() }; 950var analyzers = new DiagnosticAnalyzer[] { new AnalyzerWithNullDescriptor() }; 986var analyzers = new DiagnosticAnalyzer[] { new AnalyzerWithCSharpCompilerDiagnosticId() }; 997var analyzers = new DiagnosticAnalyzer[] { new AnalyzerWithBasicCompilerDiagnosticId() }; 1020var analyzers = new DiagnosticAnalyzer[] { analyzer }; 1119var analyzers = new DiagnosticAnalyzer[] { analyzer }; 1132var analyzers = new DiagnosticAnalyzer[] { new NotConfigurableDiagnosticAnalyzer() }; 1166var analyzers = new DiagnosticAnalyzer[] { new CodeBlockActionAnalyzer() }; 1185var analyzers = new DiagnosticAnalyzer[] { new CodeBlockActionAnalyzer(onlyStatelessAction: true) }; 1215private void TestGenericNameCore(string source, params DiagnosticAnalyzer[] analyzers) 1229var analyzers = new DiagnosticAnalyzer[] { new CSharpNamespaceDeclarationAnalyzer() }; 1269var analyzers = new DiagnosticAnalyzer[] { new AnalyzerWithNoSupportedDiagnostics() }; 1362var analyzers = new DiagnosticAnalyzer[] { new CSharpCodeBlockObjectCreationAnalyzer() }; 1395var analyzers = new DiagnosticAnalyzer[] { new NonConcurrentAnalyzer() }; 1427var analyzers = new DiagnosticAnalyzer[] { new ConcurrentAnalyzer(typeNames) }; 1440analyzers = new DiagnosticAnalyzer[] { new ConcurrentAnalyzer(typeNames), new NonConcurrentAnalyzer() }; 1617var analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeAnalyzer2() }; 1687.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new OwningSymbolTestAnalyzer() }, null, null, 1701var analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeAnalyzer(generatedCodeAnalysisFlagsOpt, testIsGeneratedCodeInCallbacks) }; 1707var analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeAnalyzer(generatedCodeAnalysisFlagsOpt, testIsGeneratedCodeInCallbacks: true) }; 1889var analyzers = new DiagnosticAnalyzer[] { new EnsureNoMergedNamespaceSymbolAnalyzer() }; 1914var analyzers = new DiagnosticAnalyzer[] { new SharedStateAnalyzer() }; 1947var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 1968var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 1991var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2012var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2037var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2057var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2076var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2099var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2120var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2146var analyzers = new DiagnosticAnalyzer[] { new AnalyzerForParameters() }; 2179var analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeAnalyzer(GeneratedCodeAnalysisFlags.None) }; 2187analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeAnalyzer(GeneratedCodeAnalysisFlags.Analyze) }; 2195analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeAnalyzer(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics) }; 2247var analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeSyntaxAndOperationAnalyzer(GeneratedCodeAnalysisFlags.None, syntaxKinds, operationKinds) }; 2255analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeSyntaxAndOperationAnalyzer(GeneratedCodeAnalysisFlags.Analyze, syntaxKinds, operationKinds) }; 2263analyzers = new DiagnosticAnalyzer[] { new GeneratedCodeSyntaxAndOperationAnalyzer(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics, syntaxKinds, operationKinds) }; 2478var analyzers = new DiagnosticAnalyzer[] { new FieldReferenceOperationAnalyzer(doOperationBlockAnalysis) }; 2545var analyzers = new DiagnosticAnalyzer[] { new FieldReferenceOperationAnalyzer(doOperationBlockAnalysis) }; 2574var analyzers = new DiagnosticAnalyzer[] { new FieldReferenceOperationAnalyzer(doOperationBlockAnalysis) }; 2593var analyzers = new DiagnosticAnalyzer[] { new MethodOrConstructorBodyOperationAnalyzer() }; 2611var analyzers = new DiagnosticAnalyzer[] { new MethodOrConstructorBodyOperationAnalyzer() }; 2632var analyzers = new DiagnosticAnalyzer[] { new MethodOrConstructorBodyOperationAnalyzer() }; 2657var analyzers = new DiagnosticAnalyzer[] { new MethodOrConstructorBodyOperationAnalyzer() }; 2733compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { analyzer }, 2742compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { analyzer }, 2751compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { analyzer }, 2758compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { analyzer }, 2777TestSymbolStartAnalyzerCore(new DiagnosticAnalyzer[] { analyzer }, diagnostics); 2780private static void TestSymbolStartAnalyzerCore(DiagnosticAnalyzer[] analyzers, params DiagnosticDescription[] diagnostics) 2932TestSymbolStartAnalyzerCore(new DiagnosticAnalyzer[] { analyzer1, analyzer2 }, 2958TestSymbolStartAnalyzerCore(new DiagnosticAnalyzer[] { analyzer1, analyzer2 }, 2992var analyzers = new DiagnosticAnalyzer[symbolKinds.Length]; 3086var analyzers = new DiagnosticAnalyzer[symbolKinds.Length]; 3146var analyzers = new DiagnosticAnalyzer[symbolKinds.Length]; 3191var analyzers = new DiagnosticAnalyzer[] { new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, OperationKind.Invocation) }; 3223var analyzers = new DiagnosticAnalyzer[] { new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.NamedType, OperationKind.FieldReference) }; 3265var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType)); 3311var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType)); 3349var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2)); 3357var tree1SemanticDiagnostics = await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel1, filterSpan: null, ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1), CancellationToken.None); 3376compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3391compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3400compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3419compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3435compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3444compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3453compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3472compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3487compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3496compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3505compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3523compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3538compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }); 3544compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3559compilation.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { namedTypeAnalyzer }, 3597var analyzers = new DiagnosticAnalyzer[] { new RegisterOperationBlockAndOperationActionAnalyzer() }; 3625var analyzers = new DiagnosticAnalyzer[] { new RegisterOperationBlockAndOperationActionAnalyzer() }; 3652var analyzers = new DiagnosticAnalyzer[] { new RegisterOperationBlockAndOperationActionAnalyzer() }; 3686var allAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3694var analyzersToQuery = singleAnalyzer ? ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1) : allAnalyzers; 3711var diagnostics = diagnosticsMap.TryGetValue(tree1, out var value) ? value : ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty; 3713foreach (var analyzer in allAnalyzers) 3753var allAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3813var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 3887var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 3929var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3939var singleAnalyzerArray = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1); 3957ImmutableArray<DiagnosticAnalyzer> analyzers, 3998ImmutableArray<DiagnosticAnalyzer> analyzers, 4009foreach (var analyzer in analyzers) 4021static ImmutableArray<Diagnostic> getReportedDiagnostics(AnalysisResult analysisResult, DiagnosticAnalyzer analyzer, AdditionalText additionalFile) 4097var analyzers = new DiagnosticAnalyzer[] { new RecordDeclarationAnalyzer() }; 4154var analyzers = new DiagnosticAnalyzer[] { new PrimaryConstructorBaseTypeAnalyzer(baseListNode, syntaxKinds) }; 4205.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { analyzer }, null, null, 4229var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 4314var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 4397var analyzersArray = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer);
Diagnostics\DiagnosticSuppressorTests.cs (36)
29DiagnosticAnalyzer[] analyzers, 35DiagnosticAnalyzer[] analyzers, 41DiagnosticAnalyzer[] analyzers) 66var analyzers = new DiagnosticAnalyzer[] { new DiagnosticSuppressorForId("CS1522") }; 109var analyzers = new DiagnosticAnalyzer[] { new DiagnosticSuppressorForId("CS1522") }; 152var analyzers = new DiagnosticAnalyzer[] { new DiagnosticSuppressorForId("CS1522") }; 177var analyzers = new DiagnosticAnalyzer[] { new DiagnosticSuppressorForId("CS0169") }; 200var analyzers = new DiagnosticAnalyzer[] { new DiagnosticSuppressorForId("CS1001") }; 221var analyzers = new DiagnosticAnalyzer[] { new DiagnosticSuppressorForId("CS0246") }; 238VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer }, expectedDiagnostics); 240var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.Descriptor.Id) }; 258VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer }, expectedDiagnostic); 262var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.Descriptor.Id), new DiagnosticSuppressorForId(analyzer.Descriptor.Id) }; 267analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.Descriptor.Id, suppressionId: "SPR0001"), new DiagnosticSuppressorForId(analyzer.Descriptor.Id, suppressionId: "SPR0002") }; 283VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer }, 289var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor1, suppressor2 }; 306VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer }, expectedDiagnostic); 309var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.Descriptor.Id, suppressionId) }; 356var analyzersWithoutSuppressor = new DiagnosticAnalyzer[] { analyzer }; 357var analyzersWithSuppressor = new DiagnosticAnalyzer[] { analyzer, suppressor }; 409var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 453var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 481var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 534var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 587var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 636VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer }, expectedDiagnostic); 640var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 651analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor, suppressor2 }; 676VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer }, expectedDiagnostic); 680var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, suppressor }; 700VerifyAnalyzerDiagnostics(compilation, new DiagnosticAnalyzer[] { analyzer1, analyzer2 }, expectedDiagnostics); 704var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer1, analyzer2, suppressor }; 718var analyzers = withSuppressor ? ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, suppressor) : ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1); 722analyzers = withSuppressor ? ImmutableArray.Create<DiagnosticAnalyzer>(analyzer2, suppressor) : ImmutableArray.Create<DiagnosticAnalyzer>(analyzer2);
Diagnostics\GetDiagnosticsTests.cs (14)
651var analyzers = new DiagnosticAnalyzer[] { new CSharpCompilerDiagnosticAnalyzer() }; 677var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 724static async Task verifyDiagnosticsAsync(Compilation compilation, DiagnosticAnalyzer analyzer, (string key, string value)? options) 787var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 840var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, OperationKind.VariableDeclaration)); 869var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 909var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 963var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1189var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(compilerAnalyzer), AnalyzerOptions.Empty); 1249var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1563var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 1582analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer(), suppressor); 1644var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1823var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty);
Diagnostics\OperationAnalyzerTests.cs (39)
48.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new EmptyArrayAnalyzer() }, null, null, 110.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new BoxingOperationAnalyzer() }, null, null, 140.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new BadStuffTestAnalyzer() }, null, null, 189.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new BadStuffTestAnalyzer() }, null, null); 217.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new BigForTestAnalyzer() }, null, null, 282.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new SwitchTestAnalyzer() }, null, null, 347.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new InvocationTestAnalyzer() }, null, null, 424.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new FieldCouldBeReadOnlyAnalyzer() }, null, null, 496.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new FieldCouldBeReadOnlyAnalyzer() }, null, null, 551.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new LocalCouldBeConstAnalyzer() }, null, null, 722.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new SymbolCouldHaveMoreSpecificTypeAnalyzer() }, null, null, 787.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new SeventeenTestAnalyzer() }, null, null, 827.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new NullArgumentTestAnalyzer() }, null, null, 880.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new MemberInitializerTestAnalyzer() }, null, null, 930.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new AssignmentTestAnalyzer() }, null, null, 979.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ArrayInitializerTestAnalyzer() }, null, null, 1015.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new VariableDeclarationTestAnalyzer() }, null, null, 1079.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new CaseTestAnalyzer() }, null, null, 1120.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ExplicitVsImplicitInstanceAnalyzer() }, null, null, 1156.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new MemberReferenceAnalyzer() }, null, null, 1219.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ParamsArrayTestAnalyzer() }, null, null, 1244.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new EqualsValueTestAnalyzer() }, null, null, 1275.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new OwningSymbolTestAnalyzer() }, null, null, 1299.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new NoneOperationTestAnalyzer() }, null, null); 1339.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new AssignmentOperationSyntaxTestAnalyzer() }, null, null, 1388.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new AddressOfTestAnalyzer() }, null, null, 1432.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new LambdaTestAnalyzer() }, null, null, 1481.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new StaticMemberTestAnalyzer() }, null, null, 1507.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new LabelOperationsTestAnalyzer() }, null, null, 1566.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new UnaryAndBinaryOperationsTestAnalyzer() }, null, null, 1614.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new OperatorPropertyPullerTestAnalyzer() }, null, null); 1640.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new NullOperationSyntaxTestAnalyzer() }, null, null, 1675.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ConversionExpressionCSharpTestAnalyzer() }, null, null, 1709.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new InvalidOperatorExpressionTestAnalyzer() }, null, null, 1739.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new InvocationTestAnalyzer() }, null, null); 1782.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ConditionalAccessOperationTestAnalyzer() }, null, null, 1827.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new LiteralTestAnalyzer() }, null, null, Diagnostic("Literal", "null").WithArguments("null").WithLocation(6, 20), 1873.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new TrueFalseUnaryOperationTestAnalyzer() }, null, null, 1899.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new OperationBlockAnalyzer() }, null, null,
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
25/// requirements with <see cref="DiagnosticAnalyzer"/> and "CodeRefactoringProvider".
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (137)
Diagnostics\Configuration\ConfigureCodeStyle\BooleanCodeStyleOptionConfigurationTests.cs (2)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 28return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureCodeStyle\EnumCodeStyleOptionConfigurationTests.cs (2)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 42return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureCodeStyle\MultipleCodeStyleOptionConfigurationTests.cs (2)
37internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 44return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (2)
47internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 49return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (2)
47internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 49return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\CodeStyleOptionBasedSeverityConfigurationTests.cs (2)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 28return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\CSharpCodeStyleOptionBasedSeverityConfigurationTests.cs (2)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 28return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (2)
47internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 49return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\MultipleCodeStyleOptionBasedSeverityConfigurationTests.cs (2)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 28return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Configuration\ConfigureSeverity\VarForBuiltInTypesSeverityConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Suppression\RemoveSuppressionTests.cs (4)
56internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 58return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 1003internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1005return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (5)
129internal override ImmutableArray<DiagnosticAnalyzer> OtherAnalyzers 163internal override ImmutableArray<DiagnosticAnalyzer> OtherAnalyzers 1204internal override ImmutableArray<DiagnosticAnalyzer> OtherAnalyzers 1522internal override ImmutableArray<DiagnosticAnalyzer> OtherAnalyzers 1543internal override ImmutableArray<DiagnosticAnalyzer> OtherAnalyzers
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (2)
30internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 32return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
Diagnostics\Suppression\SuppressionTests.cs (26)
51internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 52=> Tuple.Create<DiagnosticAnalyzer, IConfigurationFixProvider>(null, new CSharpSuppressionCodeFixProvider()); 705internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 707return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 754internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 756return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 793internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 795return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 868internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 870return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 933internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 935return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 982internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 984return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 1019internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1020=> Tuple.Create<DiagnosticAnalyzer, IConfigurationFixProvider>(null, new CSharpSuppressionCodeFixProvider()); 1039internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1041return Tuple.Create<DiagnosticAnalyzer, IConfigurationFixProvider>( 1075internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1077return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 1162internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1164return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 2214internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 2216return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>( 2651internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 2653return new Tuple<DiagnosticAnalyzer, IConfigurationFixProvider>(
EmbeddedLanguages\ValidateJsonStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
EmbeddedLanguages\ValidateRegexStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
FullyQualify\FullyQualifyTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
FullyQualify\FullyQualifyUnboundIdentifierTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
GenerateVariable\GenerateVariableTests.cs (1)
34internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProviderTests.cs (1)
26internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
PreferFrameworkType\PreferFrameworkTypeTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_AsTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
RemoveUnusedVariable\RemoveUnusedVariableTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
SimplifyThisOrMe\SimplifyThisOrMeTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
SpellCheck\SpellCheckTests.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddOrRemoveAccessibilityModifiersFixAllTests.cs (1)
21internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddAnonymousTypeMemberName\AddAnonymousTypeMemberNameTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddBraces\AddBracesTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddExplicitCast\AddExplicitCastTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddParameter\AddParameterTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredExpressionParenthesesTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredPatternParenthesesTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AliasAmbiguousType\AliasAmbiguousTypeTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateEnumMember\GenerateEnumMemberTests.cs (1)
20internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateConversionTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateDeconstructMethodTests.cs (1)
20internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
23internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\HideBase\HideBaseTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests_ThroughMember.cs (1)
23internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessTests.cs (1)
21internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Iterator\ChangeToIEnumerableTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.cs (1)
43internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeMethodAsynchronous\MakeMethodAsynchronousTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeRefStruct\MakeRefStructTests.cs (1)
41internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeTypeAbstract\MakeTypeAbstractTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MisplacedUsingDirectives\MisplacedUsingDirectivesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Nullable\CSharpDeclareAsNullableCodeFixTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersCompilerErrorTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchExpressionTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchStatementTests.cs (1)
20internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveInKeyword\RemoveInKeywordCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveNewModifier\RemoveNewModifierCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_FixAllTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests_FixAllTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedLocalFunction\RemoveUnusedLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
38internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyBooleanExpression\SimplifyConditionalTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpdateProjectToAllowUnsafe\UpdateProjectToAllowUnsafeTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExplicitTypeForConst\UseExplicitTypeForConstTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExpressionBodyForLambda\UseExpressionBodyForLambdasAnalyzerTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInterpolatedVerbatimString\UseInterpolatedVerbatimStringCodeFixTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseSystemHashCode\UseSystemHashCodeTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ValidateFormatString\ValidateFormatStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzerTests.cs (1)
34internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzerTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
MockCSharpCompiler.cs (5)
19private readonly ImmutableArray<DiagnosticAnalyzer> _analyzers; 27public MockCSharpCompiler(string responseFile, string workingDirectory, string[] args, ImmutableArray<DiagnosticAnalyzer> analyzers = default, ImmutableArray<ISourceGenerator> generators = default, AnalyzerAssemblyLoader loader = null, ImmutableArray<MetadataReference> additionalReferences = default) 32public MockCSharpCompiler(string responseFile, BuildPaths buildPaths, string[] args, ImmutableArray<DiagnosticAnalyzer> analyzers = default, ImmutableArray<ISourceGenerator> generators = default, AnalyzerAssemblyLoader loader = null, GeneratorDriverCache driverCache = null, ImmutableArray<MetadataReference> additionalReferences = default) 47out ImmutableArray<DiagnosticAnalyzer> analyzers, 64out ImmutableArray<DiagnosticAnalyzer> analyzers,
Microsoft.CodeAnalysis.EditorFeatures (10)
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (7)
46IEnumerable<DiagnosticAnalyzer> csharpAnalyzers = analyzerReference.GetAnalyzers(LanguageNames.CSharp); 47IEnumerable<DiagnosticAnalyzer> visualBasicAnalyzers = analyzerReference.GetAnalyzers(LanguageNames.VisualBasic); 56IEnumerable<AnalyzerSetting> ToAnalyzerSetting(IEnumerable<DiagnosticAnalyzer> analyzers, 74private sealed class DiagnosticAnalyzerComparer : IEqualityComparer<DiagnosticAnalyzer> 78public bool Equals(DiagnosticAnalyzer? x, DiagnosticAnalyzer? y) 89public int GetHashCode(DiagnosticAnalyzer obj) => obj.GetAnalyzerIdAndVersion().GetHashCode();
Suggestions\SuggestedActionPriorityProvider.cs (3)
26public ConcurrentSet<DiagnosticAnalyzer> Analyzers { get; } = []; 30public void AddDeprioritizedAnalyzerWithLowPriority(DiagnosticAnalyzer analyzer) 38public bool IsDeprioritizedAnalyzerWithLowPriority(DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Diagnostics\DiagnosticTaggerWrapper.cs (1)
31IReadOnlyDictionary<string, ImmutableArray<DiagnosticAnalyzer>>? analyzerMap = null,
Squiggles\SquiggleUtilities.cs (1)
31IReadOnlyDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzerMap = null)
Squiggles\TestDiagnosticTagProducer.cs (1)
21IReadOnlyDictionary<string, ImmutableArray<DiagnosticAnalyzer>>? analyzerMap = null)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (25)
CodeFixes\CodeFixServiceTests.cs (13)
131var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzerWithFix, analyzerWithoutFix); 167var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(documentDiagnosticAnalyzer); 196var analyzers = ImmutableArray<DiagnosticAnalyzer>.Empty; 265private static async Task<ImmutableArray<CodeFixCollection>> GetAddedFixesAsync(CodeFixProvider codefix, DiagnosticAnalyzer diagnosticAnalyzer, bool exception = false, bool throwExceptionInFixerCreation = false) 417public readonly ImmutableArray<DiagnosticAnalyzer> Analyzers; 421private static readonly ImmutableArray<DiagnosticAnalyzer> s_defaultAnalyzers = [new MockDiagnosticAnalyzer()]; 423public MockAnalyzerReference(ImmutableArray<CodeFixProvider> fixers, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableArray<ISourceGenerator> generators) 430public MockAnalyzerReference(ImmutableArray<CodeFixProvider> fixers, ImmutableArray<DiagnosticAnalyzer> analyzers) 435public MockAnalyzerReference(CodeFixProvider? fixer, ImmutableArray<DiagnosticAnalyzer> analyzers) 477public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 480public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() 746var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(diagnosticAnalyzer); 1084var lowPriorityAnalyzer = Assert.Single(lowPriorityAnalyzerData.Analyzers);
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
146public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 149public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages()
Completion\CompletionServiceTests.cs (2)
85public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 88public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages()
Diagnostics\DiagnosticAnalyzerServiceTests.cs (4)
306private static AdhocWorkspace CreateWorkspaceWithProjectAndAnalyzer(DiagnosticAnalyzer analyzer) 366var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 427var analyzers = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 490var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
33foreach (var analyzer in analyzerReference.GetAnalyzers(languageName))
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
53protected override async Task VerifyAsync(string source, string language, DiagnosticAnalyzer[] analyzers, DiagnosticDescription[] expectedDiagnostics, string rootNamespace = null)
Preview\PreviewWorkspaceTests.cs (2)
139var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CommonDiagnosticAnalyzers.NotConfigurableDiagnosticAnalyzer()); 163private static void ExecuteAnalyzers(PreviewWorkspace previewWorkspace, ImmutableArray<DiagnosticAnalyzer> analyzers)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (60)
CodeFixes\CodeFixServiceTests.vb (2)
55Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 125Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer))
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
36Friend MustOverride Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider) 135Public Shared Sub AddAnalyzerToWorkspace(workspace As Workspace, analyzer As DiagnosticAnalyzer)
Diagnostics\AddImport\AddImportCrossLanguageTests.vb (1)
20Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
19Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\AddMissingReference\AddMissingReferenceTests.vb (1)
28Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\DiagnosticProviderTests.vb (1)
289NoCompilationConstants.LanguageName, ImmutableArray.Create(Of DiagnosticAnalyzer)(New NoCompilationDocumentDiagnosticAnalyzer()))
Diagnostics\DiagnosticServiceTests.vb (46)
83Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 105Dim projectAnalyzers1 = ImmutableArray.Create(Of DiagnosticAnalyzer)(projectDiagnosticAnalyzer1) 122Dim projectAnalyzers2 = ImmutableArray.Create(Of DiagnosticAnalyzer)(projectDiagnosticAnalyzer2) 189Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 199Dim projectAnalyzersEmpty = ImmutableArray(Of DiagnosticAnalyzer).Empty 229ImmutableArray.Create(Of DiagnosticAnalyzer)(New TestDiagnosticAnalyzer1(0)), display:=referenceName) 238ImmutableArray.Create(Of DiagnosticAnalyzer)(New TestDiagnosticAnalyzer1(1)), display:=referenceName) 269Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 331Dim analyzer1 As DiagnosticAnalyzer = New TestDiagnosticAnalyzer1(1) 332Dim analyzer2 As DiagnosticAnalyzer = New TestDiagnosticAnalyzer2(2) 379Dim analyzersMap = New Dictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)) From 381{LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer1)}, 382{LanguageNames.VisualBasic, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer2)} 461Dim analyzerReference1 = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 462Dim analyzerReference2 = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 485Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 520Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 567Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 599Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 633Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 667Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 743Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 779Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 840Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 866Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 908Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 944Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 984Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1007Await TestDiagnosticsReportedOnAllPartialDefinitionsCoreAsync(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1019Await TestDiagnosticsReportedOnAllPartialDefinitionsCoreAsync(ImmutableArray.Create(Of DiagnosticAnalyzer)(dummyAnalyzer, analyzer)) 1023Private Shared Async Function TestDiagnosticsReportedOnAllPartialDefinitionsCoreAsync(analyzers As ImmutableArray(Of DiagnosticAnalyzer)) As Task 1091Dim analyzer As DiagnosticAnalyzer = New CodeBlockOrSyntaxNodeAnalyzer(isCodeBlockAnalyzer:=True) 1134Dim analyzer As DiagnosticAnalyzer = New CodeBlockOrSyntaxNodeAnalyzer(isCodeBlockAnalyzer:=False) 1177Dim analyzer As DiagnosticAnalyzer = New MethodSymbolAnalyzer 1229Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1292Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1339Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1405Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1963Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2017Private Shared Async Function TestGenericNameCoreAsync(test As XElement, expectedMessage As String, expectedId As String, ParamArray analyzers As DiagnosticAnalyzer()) As Task 2090Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2129Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2230Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2275Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(compilerAnalyzer, syntaxAnalyzer, semanticAnalyzer)) 2345Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(compilerAnalyzer, syntaxAnalyzer, semanticAnalyzer)) 2435Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))
Diagnostics\GenerateEvent\GenerateEventCrossLanguageTests.vb (1)
13Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\GenerateFromUsage\GenerateConstructorCrossLanguageTests.vb (1)
12Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\GenerateFromUsage\GenerateMethodCrossLanguageTests.vb (1)
18Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\GenerateFromUsage\GenerateVariableCrossLanguageTests.vb (1)
20Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\ImplementInterface\ImplementInterfaceCrossLanguageTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\UseAutoProperty\UseAutoPropertyTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Microsoft.CodeAnalysis.Features (141)
CodeFixesAndRefactorings\CodeActionRequestPriorityProvider.cs (6)
23void AddDeprioritizedAnalyzerWithLowPriority(DiagnosticAnalyzer analyzer); 25bool IsDeprioritizedAnalyzerWithLowPriority(DiagnosticAnalyzer analyzer); 42public static bool MatchesPriority(this ICodeActionRequestPriorityProvider provider, DiagnosticAnalyzer analyzer) 116private HashSet<DiagnosticAnalyzer>? _lowPriorityAnalyzers; 121public void AddDeprioritizedAnalyzerWithLowPriority(DiagnosticAnalyzer analyzer) 152public bool IsDeprioritizedAnalyzerWithLowPriority(DiagnosticAnalyzer analyzer)
Diagnostics\DiagnosticAnalyzerExtensions.cs (8)
16public static bool IsWorkspaceDiagnosticAnalyzer(this DiagnosticAnalyzer analyzer) 19public static bool IsBuiltInAnalyzer(this DiagnosticAnalyzer analyzer) 29public static (string analyzerId, VersionStamp version) GetAnalyzerIdAndVersion(this DiagnosticAnalyzer analyzer) 47public static string GetAnalyzerAssemblyName(this DiagnosticAnalyzer analyzer) 50public static void AppendAnalyzerMap(this Dictionary<string, DiagnosticAnalyzer> analyzerMap, ImmutableArray<DiagnosticAnalyzer> analyzers) 52foreach (var analyzer in analyzers) 59public static IEnumerable<AnalyzerPerformanceInfo> ToAnalyzerPerformanceInfo(this IDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> analysisResult, DiagnosticAnalyzerInfoCache analyzerInfo)
Diagnostics\DiagnosticAnalyzerTelemetry.cs (1)
51public void UpdateAnalyzerActionsTelemetry(DiagnosticAnalyzer analyzer, AnalyzerTelemetryInfo analyzerTelemetryInfo, bool isTelemetryCollectionAllowed)
Diagnostics\IDiagnosticAnalyzerService.cs (2)
56Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken); 73Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Project project, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken);
Diagnostics\Options\SolutionCrawlerOptionsStorage.cs (1)
61public static bool IsFullSolutionAnalysisEnabled(this DiagnosticAnalyzer analyzer, IGlobalOptionService globalOptions, string language)
Diagnostics\Service\DiagnosticAnalyzerService.cs (3)
121Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken) 128Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, 139public Task<ImmutableArray<DiagnosticAnalyzer>> GetAnalyzersAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Service\DocumentAnalysisExecutor.cs (9)
33private readonly ImmutableArray<DiagnosticAnalyzer> _compilationBasedProjectAnalyzersInAnalysisScope; 34private readonly ImmutableArray<DiagnosticAnalyzer> _compilationBasedHostAnalyzersInAnalysisScope; 36private ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? _lazySyntaxDiagnostics; 37private ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? _lazySemanticDiagnostics; 71public async Task<IEnumerable<DiagnosticData>> ComputeDiagnosticsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 152private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetAnalysisResultAsync(DocumentAnalysisScope analysisScope, CancellationToken cancellationToken) 169private async Task<ImmutableArray<DiagnosticData>> GetCompilerAnalyzerDiagnosticsAsync(DiagnosticAnalyzer analyzer, TextSpan? span, CancellationToken cancellationToken) 188private async Task<ImmutableArray<DiagnosticData>> GetSyntaxDiagnosticsAsync(DiagnosticAnalyzer analyzer, bool isCompilerAnalyzer, CancellationToken cancellationToken) 223private async Task<ImmutableArray<DiagnosticData>> GetSemanticDiagnosticsAsync(DiagnosticAnalyzer analyzer, bool isCompilerAnalyzer, CancellationToken cancellationToken)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (2)
29internal static Diagnostic CreateAnalyzerExceptionDiagnostic(DiagnosticAnalyzer analyzer, Exception e) 52public static bool IsAnalyzerEnabledForProject(DiagnosticAnalyzer analyzer, Project project, IGlobalOptionService globalOptions)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (3)
22/// cref="DiagnosticAnalyzer"/>s passed along with the project. As such, we might not be able to use a prior cached 26private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersPair? compilationWithAnalyzersPair)>> s_projectToCompilationWithAnalyzers = new(); 30ImmutableArray<DiagnosticAnalyzer> analyzers,
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
48public Task<ImmutableArray<DiagnosticAnalyzer>> GetAnalyzersForTestingPurposesOnlyAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (10)
24/// Return all diagnostics that belong to given project for the given <see cref="DiagnosticAnalyzer"/> either 27private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticAnalysisResultsAsync( 52async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync( 53ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result) 62var compilerAnalyzer = project.Solution.SolutionState.Analyzers.GetCompilerDiagnosticAnalyzer(project.Language); 87async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticsForAnalyzersAsync( 92var result = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty; 117async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> MergeProjectDiagnosticAnalyzerDiagnosticsAsync( 119ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result) 163void UpdateAnalyzerTelemetryData(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> telemetry)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.HostAnalyzerInfo.cs (15)
41static (IEnumerable<ImmutableArray<DiagnosticAnalyzer>> HostAnalyzerCollection, IEnumerable<ImmutableArray<DiagnosticAnalyzer>> ProjectAnalyzerCollection) GetAnalyzerCollections( 42ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> analyzersPerReference, 50var hostAnalyzerCollection = ArrayBuilder<ImmutableArray<DiagnosticAnalyzer>>.GetInstance(); 51var projectAnalyzerCollection = ArrayBuilder<ImmutableArray<DiagnosticAnalyzer>>.GetInstance(); 103private readonly ImmutableHashSet<DiagnosticAnalyzer> _hostAnalyzers; 104private readonly ImmutableHashSet<DiagnosticAnalyzer> _allAnalyzers; 105public readonly ImmutableArray<DiagnosticAnalyzer> OrderedAllAnalyzers; 108ImmutableHashSet<DiagnosticAnalyzer> hostAnalyzers, 109ImmutableHashSet<DiagnosticAnalyzer> allAnalyzers) 120public bool IsHostAnalyzer(DiagnosticAnalyzer analyzer) 123public HostAnalyzerInfo WithExcludedAnalyzers(ImmutableHashSet<DiagnosticAnalyzer> excludedAnalyzers) 133private int PriorityComparison(DiagnosticAnalyzer state1, DiagnosticAnalyzer state2) 136private static int GetPriority(DiagnosticAnalyzer state)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (17)
48public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDiagnosticsAsync( 50ImmutableArray<DiagnosticAnalyzer> analyzers, 78using var _1 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var spanBasedAnalyzers); 79using var _2 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var documentBasedAnalyzers); 80(DiagnosticAnalyzer analyzer, bool spanBased)? compilerAnalyzerData = null; 81foreach (var analyzer in analyzers) 113using var _ = PooledDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>.GetInstance(out var builder); 127(DiagnosticAnalyzer analyzer, bool spanBased)? compilerAnalyzerData, 129Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 137using var _ = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(1, analyzer, out var analyzers); 142ArrayBuilder<DiagnosticAnalyzer> analyzers, 144Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 154ArrayBuilder<DiagnosticAnalyzer> analyzers, 156Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 167ArrayBuilder<DiagnosticAnalyzer> analyzers, 169Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 176foreach (var analyzer in analyzers)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (11)
19/// This is in charge of anything related to <see cref="DiagnosticAnalyzer"/> 44/// Return <see cref="DiagnosticAnalyzer"/>s for the given <see cref="Project"/>. 46public async Task<ImmutableArray<DiagnosticAnalyzer>> GetOrCreateAnalyzersAsync( 61private static (ImmutableHashSet<DiagnosticAnalyzer> hostAnalyzers, ImmutableHashSet<DiagnosticAnalyzer> allAnalyzers) PartitionAnalyzers( 62IEnumerable<ImmutableArray<DiagnosticAnalyzer>> projectAnalyzerCollection, 63IEnumerable<ImmutableArray<DiagnosticAnalyzer>> hostAnalyzerCollection, 66using var _1 = PooledHashSet<DiagnosticAnalyzer>.GetInstance(out var hostAnalyzers); 67using var _2 = PooledHashSet<DiagnosticAnalyzer>.GetInstance(out var allAnalyzers); 79foreach (var analyzer in analyzers) 88foreach (var analyzer in analyzers)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (2)
29public readonly ImmutableHashSet<DiagnosticAnalyzer> Analyzers; 35ImmutableHashSet<DiagnosticAnalyzer> analyzers,
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (7)
21public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken) 38Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, 54Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, 72foreach (var analyzer in analyzers) 108async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetOrComputeDiagnosticAnalysisResultsAsync( 109ImmutableArray<DiagnosticAnalyzer> analyzers) 138bool ShouldIncludeAnalyzer(Project project, DiagnosticAnalyzer analyzer)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (16)
26private static async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreAsync( 30using var _ = PooledDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>.GetInstance(out var builder); 31foreach (var analyzer in executor.AnalysisScope.ProjectAnalyzers.ConcatFast(executor.AnalysisScope.HostAnalyzers)) 41DiagnosticAnalyzer analyzer, 94using var _1 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var syntaxAnalyzers); 101using var _2 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var semanticSpanBasedAnalyzers); 102using var _3 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var semanticDocumentBasedAnalyzers); 106foreach (var analyzer in analyzers) 169DiagnosticAnalyzer analyzer, 196ImmutableArray<DiagnosticAnalyzer> analyzers, 206using var _ = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(analyzers.Length, out var filteredAnalyzers); 207foreach (var analyzer in analyzers) 235ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> diagnosticsMap; 253foreach (var analyzer in analyzers) 264DiagnosticAnalyzer analyzer, AnalysisKind kind, TextSpan? span) 310async Task<bool> IsCandidateForDeprioritizationBasedOnRegisteredActionsAsync(DiagnosticAnalyzer analyzer)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (6)
36private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> diagnosticAnalysisResults)>> s_projectToForceAnalysisData = new(); 63foreach (var analyzer in analyzers) 76async Task<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> diagnosticAnalysisResults)> ComputeForceAnalyzeProjectAsync() 96DiagnosticAnalyzerInfoCache infoCache, DiagnosticAnalyzer analyzer, bool isHostAnalyzer, Project project)
Diagnostics\Service\EngineV2\InProcOrRemoteHostAnalyzerRunner.cs (13)
36public Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeDocumentAsync( 44public Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeProjectAsync( 52private async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeAsync( 64async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeCoreAsync() 80private async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeInProcAsync( 104var builderMap = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>.Empty; 114var telemetry = ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>.Empty; 157private static async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeOutOfProcAsync( 166using var pooledObject1 = SharedPools.Default<Dictionary<string, DiagnosticAnalyzer>>().GetPooledObject(); 167using var pooledObject2 = SharedPools.Default<Dictionary<string, DiagnosticAnalyzer>>().GetPooledObject(); 179return DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty; 198return DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty; 200return new DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>(
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (5)
88Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 394Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 398using var _1 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var analyzersBuilder); 404foreach (var analyzer in compilationWithAnalyzers.Analyzers) 483static void AddAllDiagnostics(ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnostics, ArrayBuilder<Diagnostic> reportedDiagnostics)
SyncNamespaces\AbstractSyncNamespacesService.cs (3)
41var diagnosticAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(DiagnosticAnalyzer); 60ImmutableArray<DiagnosticAnalyzer> diagnosticAnalyzers, 77ImmutableArray<DiagnosticAnalyzer> diagnosticAnalyzers,
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
63foreach (var analyzer in analyzers)
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDocumentsAndProjectDiagnosticSourceProvider.cs (2)
70Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer = !compilerFullSolutionAnalysisEnabled || !analyzersFullSolutionAnalysisEnabled 107bool ShouldIncludeAnalyzer(DiagnosticAnalyzer analyzer)
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (2)
21public static AbstractProjectDiagnosticSource CreateForFullSolutionAnalysisDiagnostics(Project project, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer) 37private sealed class FullSolutionAnalysisDiagnosticSource(Project project, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer)
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (2)
18public static AbstractWorkspaceDocumentDiagnosticSource CreateForFullSolutionAnalysisDiagnostics(TextDocument document, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer) 25TextDocument document, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer)
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (2)
14TextDocument document, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer) 17private readonly Func<DiagnosticAnalyzer, bool>? _shouldIncludeAnalyzer = shouldIncludeAnalyzer;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (10)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (5)
41var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticAnalyzer>>(); 317private protected Task<TestLspServer> CreateTestWorkspaceWithDiagnosticsAsync(string markup, bool mutatingLspWorkspace, BackgroundAnalysisScope analyzerDiagnosticsScope, bool useVSDiagnostics, CompilerDiagnosticsScope? compilerDiagnosticsScope = null, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) 320private protected Task<TestLspServer> CreateTestWorkspaceWithDiagnosticsAsync(string[] markups, bool mutatingLspWorkspace, BackgroundAnalysisScope analyzerDiagnosticsScope, bool useVSDiagnostics, CompilerDiagnosticsScope? compilerDiagnosticsScope = null, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) 323private protected Task<TestLspServer> CreateTestWorkspaceFromXmlAsync(string xmlMarkup, bool mutatingLspWorkspace, BackgroundAnalysisScope analyzerDiagnosticsScope, bool useVSDiagnostics, CompilerDiagnosticsScope? compilerDiagnosticsScope = null, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) 332IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null)
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
157=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, [DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp), new MockAdditionalFileDiagnosticAnalyzer()]));
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (1)
53var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticAnalyzer>>();
Diagnostics\NonLocalDiagnosticTests.cs (1)
71=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, [DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp), new NonLocalDiagnosticsAnalyzer()]));
Diagnostics\PullDiagnosticTests.cs (1)
79var additionalAnalyzers = new DiagnosticAnalyzer[] { new CSharpSyntaxAnalyzer(), new CSharpSemanticAnalyzer() };
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
68=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, [DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp), new MockProjectDiagnosticAnalyzer()]));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
227protected static JArray GetAnalyzerValues(Compilation compilation, params DiagnosticAnalyzer[] analyzers)
Microsoft.CodeAnalysis.Remote.ServiceHub (31)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (30)
27/// Cache of <see cref="CompilationWithAnalyzers"/> and a map from analyzer IDs to <see cref="DiagnosticAnalyzer"/>s 174BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap, 175ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, 176ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, 206var builderMap = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>.Empty; 222ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder> builderMap, 223BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap) 244ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, 245ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, 246BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap) 248Func<DiagnosticAnalyzer, bool> shouldInclude; 253using var _1 = PooledHashSet<DiagnosticAnalyzer>.GetInstance(out var analyzersSet); 280private static string GetAnalyzerId(BidirectionalMap<string, DiagnosticAnalyzer> analyzerMap, DiagnosticAnalyzer analyzer) 288private static (ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers) GetAnalyzers(BidirectionalMap<string, DiagnosticAnalyzer> analyzerMap, ImmutableArray<string> projectAnalyzerIds, ImmutableArray<string> hostAnalyzerIds) 291var projectBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 292var hostBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 296if (analyzerMap.TryGetValue(analyzerId, out var analyzer)) 304if (analyzerMap.TryGetValue(analyzerId, out var analyzer)) 325private async Task<(CompilationWithAnalyzersPair? compilationWithAnalyzers, BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap)> GetOrCreateCompilationWithAnalyzersAsync(CancellationToken cancellationToken) 362using var pooledMap = SharedPools.Default<Dictionary<string, DiagnosticAnalyzer>>().GetPooledObject(); 367using var _1 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var projectAnalyzerBuilder); 368using var _2 = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(out var hostAnalyzerBuilder); 417var analyzerToIdMap = new BidirectionalMap<string, DiagnosticAnalyzer>(analyzerMapBuilder); 429private async Task<CompilationWithAnalyzersPair> CreateCompilationWithAnalyzerAsync(ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 473public BidirectionalMap<string, DiagnosticAnalyzer> AnalyzerToIdMap { get; } 475public CompilationWithAnalyzersCacheEntry(Checksum solutionChecksum, Project project, CompilationWithAnalyzersPair? compilationWithAnalyzers, BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap)
Services\DiagnosticAnalyzer\PerformanceQueue.cs (1)
203public int GetUniqueNumber(DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Microsoft.CodeAnalysis.Test.Utilities (38)
Diagnostics\DiagnosticExtensions.cs (25)
144DiagnosticAnalyzer[] analyzers, 146Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null) 154DiagnosticAnalyzer[] analyzers, 156Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null, 165DiagnosticAnalyzer[] analyzers, 168Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null, 179DiagnosticAnalyzer[] analyzers, 181Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null, 190DiagnosticAnalyzer[] analyzers, 193Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null, 203DiagnosticAnalyzer[] analyzers, 205Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null, 225DiagnosticAnalyzer[] analyzers, 227Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException, 283DiagnosticAnalyzer[] analyzers, 285Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null, 297DiagnosticAnalyzer[] analyzers, 299Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException, 333/// Given a set of compiler or <see cref="DiagnosticAnalyzer"/> generated <paramref name="diagnostics"/>, returns the effective diagnostics after applying the below filters: 348public static bool IsDiagnosticAnalyzerSuppressed(this DiagnosticAnalyzer analyzer, CompilationOptions options) 394public static DiagnosticAnalyzer GetCompilerDiagnosticAnalyzer(string languageName) 397(DiagnosticAnalyzer)new Diagnostics.CSharp.CSharpCompilerDiagnosticAnalyzer() : 401public static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetCompilerDiagnosticAnalyzersMap() 403var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticAnalyzer>>(); 411var analyzer = GetCompilerDiagnosticAnalyzer(languageName);
Diagnostics\SuppressMessageAttributeTests.cs (8)
64new DiagnosticAnalyzer[] { new WarningOnNamePrefixDeclarationAnalyzer("C"), new WarningOnTypeDeclarationAnalyzer() }); 80new DiagnosticAnalyzer[] { new WarningOnNamePrefixDeclarationAnalyzer("C") }); 357new DiagnosticAnalyzer[] { new WarningOnNamePrefixDeclarationAnalyzer("E"), new WarningOnTypeDeclarationAnalyzer() }); 1364protected async Task VerifyCSharpAsync(string source, DiagnosticAnalyzer[] analyzers, params DiagnosticDescription[] diagnostics) 1374protected async Task VerifyBasicAsync(string source, string rootNamespace, DiagnosticAnalyzer[] analyzers, params DiagnosticDescription[] diagnostics) 1380protected async Task VerifyBasicAsync(string source, DiagnosticAnalyzer[] analyzers, params DiagnosticDescription[] diagnostics) 1390protected abstract Task VerifyAsync(string source, string language, DiagnosticAnalyzer[] analyzers, DiagnosticDescription[] diagnostics, string rootNamespace = null); 1398return VerifyAsync(source, language, new DiagnosticAnalyzer[] { new WarningOnTokenAnalyzer(spans) }, diagnostics);
Diagnostics\ThrowingDiagnosticAnalyzer.cs (3)
61public static void VerifyAnalyzerEngineIsSafeAgainstExceptions(Func<DiagnosticAnalyzer, IEnumerable<Diagnostic>> runAnalysis) 66public static async Task VerifyAnalyzerEngineIsSafeAgainstExceptionsAsync(Func<DiagnosticAnalyzer, IEnumerable<Diagnostic>> runAnalysis) 71public static async Task VerifyAnalyzerEngineIsSafeAgainstExceptionsAsync(Func<DiagnosticAnalyzer, Task<IEnumerable<Diagnostic>>> runAnalysis)
Mocks\TestAnalyzerReference.cs (2)
28public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) => throw new NotImplementedException(); 29public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() => throw new NotImplementedException();
Microsoft.CodeAnalysis.UnitTests (17)
AnalyzerAssemblyLoaderTests.cs (7)
1187ImmutableArray<DiagnosticAnalyzer> analyzers = state is true 1194foreach (var analyzer in analyzers) 1201void assertRan(DiagnosticAnalyzer a) 1209DiagnosticAnalyzer loadAnalyzer1() 1240return (DiagnosticAnalyzer)assembly.CreateInstance("Analyzer1")!; 1243DiagnosticAnalyzer loadAnalyzer2() 1274return (DiagnosticAnalyzer)assembly.CreateInstance("Analyzer2")!;
Analyzers\AnalyzerFileReferenceTests.cs (6)
150var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 169var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 186var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 246var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 264var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 286var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>();
Diagnostics\AnalysisContextInfoTests.cs (1)
47var diagnostics = compilation.GetAnalyzerDiagnostics(new DiagnosticAnalyzer[] { analyzer }, options);
Diagnostics\CompilationWithAnalyzersTests.cs (1)
59DiagnosticAnalyzer analyzer = new AnalyzerWithDisabledRules();
Diagnostics\DiagnosticLocalizationTests.cs (1)
304Action<Exception, DiagnosticAnalyzer, Diagnostic, CancellationToken> onAnalyzerException = (ex, a, diag, ct) => exceptionDiagnostics.Add(diag);
Diagnostics\SuppressMessageAttributeCompilerTests.cs (1)
27protected override Task VerifyAsync(string source, string language, DiagnosticAnalyzer[] analyzers, DiagnosticDescription[] diagnostics, string rootNamespace = null)
Microsoft.CodeAnalysis.VisualBasic (2)
CommandLine\VisualBasicCompiler.vb (1)
261ByRef analyzers As ImmutableArray(Of DiagnosticAnalyzer),
Compilation\VisualBasicCompilation.vb (1)
2322Friend Overrides Function CreateAnalyzerDriver(analyzers As ImmutableArray(Of DiagnosticAnalyzer), analyzerManager As AnalyzerManager, severityFilter As SeverityFilter) As AnalyzerDriver
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (40)
src\Analyzers\VisualBasic\Tests\AddAnonymousTypeMemberName\AddAnonymousTypeMemberNameTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AddExplicitCast\AddExplicitCastTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AddObsoleteAttribute\AddObsoleteAttributeTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AddParameter\AddParameterTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AliasAmbiguousType\AliasAmbiguousTypeTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ConvertToAsync\ConvertToAsyncTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\GenerateConstructor\GenerateConstructorTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\GenerateEnumMember\GenerateEnumMemberTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\GenerateMethod\GenerateConversionTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ImplementAbstractClass\ImplementAbstractClassTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ImplementInterface\ImplementInterfaceCodeFixTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\MakeMethodAsynchronous\MakeMethodAsynchronousTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\MakeTypeAbstract\MakeTypeAbstractTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\NamingStyles\NamingStylesTests.vb (1)
19Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\OrderModifiers\OrderModifiersTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\PopulateSwitch\PopulateSwitchStatementTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\QualifyMemberAccess\QualifyMemberAccessTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryParenthesesTests.vb (1)
24Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnusedMembers\RemoveUnusedMembersTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\SimplifyBooleanExpression\SimplifyConditionalTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\SimplifyInterpolation\SimplifyInterpolationTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UnsealClass\UnsealClassTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseAutoProperty\UseAutoPropertyTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCollectionInitializer\UseCollectionInitializerTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseInferredMemberName\UseInferredMemberNameTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseNullPropagation\UseNullPropagationTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseSystemHashCode\UseSystemHashCodeTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ValidateFormatString\ValidateFormatStringTests.vb (1)
16workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (6)
CommandLineTests.vb (6)
7918Optional analyzers As DiagnosticAnalyzer() = Nothing, 9900Dim analyzerAndSuppressor As DiagnosticAnalyzer() = {analyzer, suppressor} 9956Dim analyzerAndSuppressor As DiagnosticAnalyzer() = {analyzer, suppressor} 10135Dim analyzer As DiagnosticAnalyzer = New WarningDiagnosticAnalyzer() ' Reports 2 warnings for each named type. 10413Dim analyzer As DiagnosticAnalyzer = New AdditionalFileAnalyzer(registerFromInitialize, diagnosticSpan) 10481ParamArray analyzers As DiagnosticAnalyzer())
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (48)
CorrectNextControlVariable\CorrectNextControlVariableTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\Configuration\ConfigureCodeStyle\BooleanCodeStyleOptionConfigurationTests.vb (2)
27Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 28Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New VisualBasicUseObjectInitializerDiagnosticAnalyzer(), New ConfigureCodeStyleOptionCodeFixProvider())
Diagnostics\Configuration\ConfigureSeverity\CodeStyleOptionBasedSeverityConfigurationTests.vb (2)
27Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 28Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New VisualBasicUseObjectInitializerDiagnosticAnalyzer(), New ConfigureSeverityLevelCodeFixProvider())
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (2)
51Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 52Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New CustomDiagnosticAnalyzer(), New ConfigureSeverityLevelCodeFixProvider())
Diagnostics\Configuration\ConfigureSeverity\MultipleCodeStyleOptionBasedConfigureSeverityTests.vb (2)
27Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 28Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New VisualBasicUseInferredMemberNameDiagnosticAnalyzer(), New ConfigureSeverityLevelCodeFixProvider())
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.vb (2)
51Friend Overrides ReadOnly Property OtherAnalyzers As ImmutableArray(Of DiagnosticAnalyzer) 53Return ImmutableArray.Create(Of DiagnosticAnalyzer)(New VisualBasicCompilerDiagnosticAnalyzer())
Diagnostics\Suppression\SuppressionTests.vb (20)
46Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 47Return Tuple.Create(Of DiagnosticAnalyzer, IConfigurationFixProvider)(Nothing, New VisualBasicSuppressionCodeFixProvider()) 671Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 672Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New VisualBasicSimplifyTypeNamesDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 714Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 715Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New UserDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 789Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 790Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New UserDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 833Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 834Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New UserDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 899Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 900Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New UserDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 956Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 957Return Tuple.Create(Of DiagnosticAnalyzer, IConfigurationFixProvider)(Nothing, New VisualBasicSuppressionCodeFixProvider()) 977Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 978Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New VisualBasicSimplifyTypeNamesDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 1048Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 1049Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New UserDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider()) 1764Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 1765Return New Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)(New UserDiagnosticAnalyzer(), New VisualBasicSuppressionCodeFixProvider())
EmbeddedLanguages\ValidateJsonStringTests.vb (1)
22Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
EmbeddedLanguages\ValidateRegexStringTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
ExitContinue\ExitContinueCodeActionTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
FixIncorrectFunctionReturnType\FixIncorrectFunctionReturnTypeTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
FullyQualify\FullyQualifyTests.vb (2)
18Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider) 855Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateEndConstruct\GenerateEndConstructTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateEvent\GenerateEventTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateMethod\GenerateMethodTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateVariable\GenerateVariableTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
MoveToTopOfFile\MoveToTopOfFileTests.vb (1)
13Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
PreferFrameworkType\PreferFrameworkTypeTests.vb (1)
22Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
RemoveUnusedVariable\RemoveUnusedVariableTest.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
SimplifyThisOrMe\SimplifyThisOrMeTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
SimplifyTypeNames\SimplifyTypeNamesTests.vb (1)
20Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
SpellCheck\SpellCheckTests.vb (2)
18Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider) 500Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (7)
Diagnostics\DiagnosticAnalyzerTests.vb (5)
1162Dim analyzers = New DiagnosticAnalyzer() {New GeneratedCodeAnalyzer(generatedCodeAnalysisFlagsOpt, testIsGeneratedCodeInCallbacks)} 1167Dim analyzers = New DiagnosticAnalyzer() {New GeneratedCodeAnalyzer(generatedCodeAnalysisFlagsOpt, testIsGeneratedCodeInCallbacks:=True)} 1643Dim analyzers = New DiagnosticAnalyzer() {New SymbolStartAnalyzer(topLevelAction:=False, SymbolKind.NamedType)} 1658Dim analyzers As ImmutableArray(Of DiagnosticAnalyzer) = ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)
Diagnostics\GetDiagnosticsTests.vb (2)
524Dim compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer), AnalyzerOptions.Empty) 696Dim compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer), AnalyzerOptions.Empty)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (7)
MockVisualBasicCompiler.vb (7)
13Private ReadOnly _analyzers As ImmutableArray(Of DiagnosticAnalyzer) 21Public Sub New(baseDirectory As String, args As String(), Optional analyzer As DiagnosticAnalyzer = Nothing) 25Public Sub New(responseFile As String, baseDirectory As String, args As String(), analyzer As DiagnosticAnalyzer) 29Public Sub New(responseFile As String, buildPaths As BuildPaths, args As String(), analyzer As DiagnosticAnalyzer) 33Public Sub New(responseFile As String, workingDirectory As String, args As String(), Optional analyzers As DiagnosticAnalyzer() = Nothing, Optional generators As ISourceGenerator() = Nothing, Optional additionalReferences As MetadataReference() = Nothing) 37Public Sub New(responseFile As String, buildPaths As BuildPaths, args As String(), Optional analyzers As DiagnosticAnalyzer() = Nothing, Optional generators As ISourceGenerator() = Nothing, Optional additionalReferences As MetadataReference() = Nothing) 54ByRef analyzers As ImmutableArray(Of DiagnosticAnalyzer),
Microsoft.CodeAnalysis.Workspaces (113)
Diagnostics\AnalysisResultPair.cs (14)
32public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergedSyntaxDiagnostics 57public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergedSemanticDiagnostics 82public ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergedAdditionalFileDiagnostics 107public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> MergedCompilationDiagnostics 132public ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> MergedAnalyzerTelemetryInfo 167private static ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergeDiagnostics<TKey>( 168ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> first, 169ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> second) 187private static ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> MergeDiagnostics( 188ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> first, 189ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> second) 206private static ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> MergeTelemetry( 207ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> first, 208ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> second)
Diagnostics\CompilationWithAnalyzersPair.cs (9)
46public ImmutableArray<DiagnosticAnalyzer> ProjectAnalyzers => ProjectCompilationWithAnalyzers?.Analyzers ?? []; 48public ImmutableArray<DiagnosticAnalyzer> HostAnalyzers => HostCompilationWithAnalyzers?.Analyzers ?? []; 50public Task<AnalyzerTelemetryInfo> GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 75public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 87public async Task<AnalysisResultPair?> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 99public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken)
Diagnostics\DiagnosticAnalyzerExtensions.cs (5)
9public static DiagnosticAnalyzerCategory GetDiagnosticAnalyzerCategory(this DiagnosticAnalyzer analyzer) 23public static bool SupportAnalysisKind(this DiagnosticAnalyzer analyzer, AnalysisKind kind) 31public static bool SupportsSyntaxDiagnosticAnalysis(this DiagnosticAnalyzer analyzer) 37public static bool SupportsSemanticDiagnosticAnalysis(this DiagnosticAnalyzer analyzer) 43public static bool SupportsSpanBasedSemanticDiagnosticAnalysis(this DiagnosticAnalyzer analyzer)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (16)
20/// <see cref="DiagnosticAnalyzer"/> instance, <see cref="DiagnosticDescriptor"/>s. 26/// Supported descriptors of each <see cref="DiagnosticAnalyzer"/>. 29/// Holds on <see cref="DiagnosticAnalyzer"/> instances weakly so that we don't keep analyzers coming from package references alive. 32/// The purpose of this map is to avoid multiple calls to <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> that might return different values 35private readonly ConditionalWeakTable<DiagnosticAnalyzer, DiagnosticDescriptorsInfo> _descriptorsInfo; 87/// Returns <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> of given <paramref name="analyzer"/>. 89public ImmutableArray<DiagnosticDescriptor> GetDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 99/// Returns <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> of given <paramref name="analyzer"/> 102public ImmutableArray<DiagnosticDescriptor> GetNonCompilationEndDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 111/// Returns <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> of given <paramref name="analyzer"/> 114public ImmutableArray<DiagnosticDescriptor> GetCompilationEndDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 126public bool IsCompilationEndAnalyzer(DiagnosticAnalyzer analyzer) 132public bool IsTelemetryCollectionAllowed(DiagnosticAnalyzer analyzer) 138private DiagnosticDescriptorsInfo GetOrCreateDescriptorsInfo(DiagnosticAnalyzer analyzer) 141private DiagnosticDescriptorsInfo CalculateDescriptorsInfo(DiagnosticAnalyzer analyzer) 182private static bool IsTelemetryCollectionAllowed(DiagnosticAnalyzer analyzer, ImmutableArray<DiagnosticDescriptor> descriptors)
Diagnostics\DocumentAnalysisScope.cs (6)
24ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, 25ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, 44public ImmutableArray<DiagnosticAnalyzer> ProjectAnalyzers { get; } 45public ImmutableArray<DiagnosticAnalyzer> HostAnalyzers { get; } 65public DocumentAnalysisScope WithAnalyzers(ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers)
Diagnostics\DocumentDiagnosticAnalyzer.cs (1)
38/// <see cref="DiagnosticAnalyzer"/> always comes before those 2 different types. Priority is ascending order and
Diagnostics\Extensions.cs (9)
74public static string GetAnalyzerId(this DiagnosticAnalyzer analyzer) 106public static async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>> ToResultBuilderMapAsync( 111ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, 112ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, 130var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>(); 131foreach (var analyzer in projectAnalyzers.ConcatFast(hostAnalyzers)) 151ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>? diagnosticsByAnalyzerMap; 241DiagnosticAnalyzer analyzer, 242ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnosticsByAnalyzer,
Diagnostics\FileContentLoadAnalyzer.cs (1)
13/// <see cref="DiagnosticAnalyzer"/>.
Diagnostics\GeneratorDiagnosticsPlaceholderAnalyzer.cs (1)
13/// A placeholder singleton analyzer. Its only purpose is to represent generator-produced diagnostics in maps that are keyed by <see cref="DiagnosticAnalyzer"/>.
Diagnostics\HostDiagnosticAnalyzers.cs (31)
26/// Key is the language the <see cref="DiagnosticAnalyzer"/> supports and key for the second map is analyzer reference identity and 27/// <see cref="DiagnosticAnalyzer"/> for that assembly reference. 31private readonly ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>> _hostDiagnosticAnalyzersPerLanguageMap; 36/// Value is set of <see cref="DiagnosticAnalyzer"/> that belong to the <see cref="AnalyzerReference"/>. 40private readonly Lazy<ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>> _lazyHostDiagnosticAnalyzersPerReferenceMap; 45private ImmutableDictionary<string, DiagnosticAnalyzer> _compilerDiagnosticAnalyzerMap; 61_hostDiagnosticAnalyzersPerLanguageMap = new ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(concurrencyLevel: 2, capacity: 2); 62_lazyHostDiagnosticAnalyzersPerReferenceMap = new Lazy<ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(() => CreateDiagnosticAnalyzersPerReferenceMap(_hostAnalyzerReferencesMap), isThreadSafe: true); 64_compilerDiagnosticAnalyzerMap = ImmutableDictionary<string, DiagnosticAnalyzer>.Empty; 73/// Get <see cref="AnalyzerReference"/> identity and <see cref="DiagnosticAnalyzer"/>s map for given <paramref name="language"/> 75public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> GetOrCreateHostDiagnosticAnalyzersPerReference(string language) 121/// Create <see cref="AnalyzerReference"/> identity and <see cref="DiagnosticAnalyzer"/>s map for given <paramref name="project"/> that 124public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReference(Project project) 133/// Create <see cref="AnalyzerReference"/> identity and <see cref="DiagnosticAnalyzer"/>s map for given <paramref name="project"/> that 136public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(ProjectState project) 139public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences, string language) 143/// Return compiler <see cref="DiagnosticAnalyzer"/> for the given language. 145public DiagnosticAnalyzer? GetCompilerDiagnosticAnalyzer(string language) 148if (_compilerDiagnosticAnalyzerMap.TryGetValue(language, out var compilerAnalyzer)) 161ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> analyzersMap) 167foreach (var analyzer in analyzers) 180private ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateHostDiagnosticAnalyzersAndBuildMap(string language) 184var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticAnalyzer>>(); 202private void UpdateCompilerAnalyzerMapIfNeeded(string language, ImmutableArray<DiagnosticAnalyzer> analyzers) 209foreach (var analyzer in analyzers) 219private static ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReferenceMap( 222var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticAnalyzer>>(); 279private static ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> MergeDiagnosticAnalyzerMap( 280ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> map1, 281ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> map2) 284var seen = new HashSet<DiagnosticAnalyzer>(map1.Values.SelectMany(v => v));
Diagnostics\SkippedHostAnalyzersInfo.cs (10)
23ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>>.Empty); 29public ImmutableHashSet<DiagnosticAnalyzer> SkippedAnalyzers { get; } 37public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>> FilteredDiagnosticIdsForAnalyzers { get; } 40ImmutableHashSet<DiagnosticAnalyzer> skippedHostAnalyzers, 41ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>> filteredDiagnosticIdsForAnalyzers) 61foreach (var analyzer in analyzers) 83var fullySkippedHostAnalyzersBuilder = ImmutableHashSet.CreateBuilder<DiagnosticAnalyzer>(); 84var partiallySkippedHostAnalyzersBuilder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<string>>(); 88foreach (var hostAnalyzer in analyzers) 120DiagnosticAnalyzer hostAnalyzer,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Workspace\IsolatedAnalyzerFileReference.cs (7)
28/// then ensures that as long as it is alive (or any <see cref="DiagnosticAnalyzer"/> or <see cref="ISourceGenerator"/> 38/// Conditional weak tables that ensure that as long as a particular <see cref="DiagnosticAnalyzer"/> or <see 42private static readonly ConditionalWeakTable<DiagnosticAnalyzer, IsolatedAnalyzerReferenceSet> s_analyzerToPinnedReferenceSet = []; 62public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 65public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() 78private ImmutableArray<DiagnosticAnalyzer> PinAnalyzers<TArg>(Func<AnalyzerReference, TArg, ImmutableArray<DiagnosticAnalyzer>> getItems, TArg arg)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
TestAnalyzerReferenceByLanguage.cs (5)
18private readonly IReadOnlyDictionary<string, ImmutableArray<DiagnosticAnalyzer>> _analyzersMap; 20public TestAnalyzerReferenceByLanguage(IReadOnlyDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzersMap, string? fullPath = null) 38public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() 41public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 51public TestAnalyzerReferenceByLanguage WithAdditionalAnalyzers(string language, IEnumerable<DiagnosticAnalyzer> analyzers)
TestGeneratorReference.cs (2)
47public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) => []; 48public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages() => [];
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
BatchFixAllProviderTests.cs (1)
157protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers()
SolutionTests\SolutionTests.cs (2)
3015DiagnosticAnalyzer analyzer = new MockDiagnosticAnalyzer(); 3042DiagnosticAnalyzer secondAnalyzer = new MockDiagnosticAnalyzer();
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
393DiagnosticAnalyzer analyzer, 435DiagnosticAnalyzer analyzer,
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
393DiagnosticAnalyzer analyzer, 435DiagnosticAnalyzer analyzer,
Microsoft.Gen.Logging.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
393DiagnosticAnalyzer analyzer, 435DiagnosticAnalyzer analyzer,
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
393DiagnosticAnalyzer analyzer, 435DiagnosticAnalyzer analyzer,
Microsoft.Gen.Metrics.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
393DiagnosticAnalyzer analyzer, 435DiagnosticAnalyzer analyzer,
Microsoft.Gen.MetricsReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
393DiagnosticAnalyzer analyzer, 435DiagnosticAnalyzer analyzer,
Microsoft.ML.CodeAnalyzer.Tests (3)
Code\RelaxTestNamingTest.cs (2)
139protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() 141foreach (var analyzer in base.GetDiagnosticAnalyzers())
Helpers\CSharpCodeFixVerifier`2.cs (1)
17where TAnalyzer : DiagnosticAnalyzer, new()
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (5)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (5)
19public readonly ImmutableArray<DiagnosticAnalyzer> Analyzers; 22private static readonly ImmutableArray<DiagnosticAnalyzer> s_defaultAnalyzers = [new MockDiagnosticAnalyzer()]; 24public MockAnalyzerReference(CodeFixProvider? fixer, ImmutableArray<DiagnosticAnalyzer> analyzers) 46public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(string language) 49public override ImmutableArray<DiagnosticAnalyzer> GetAnalyzersForAllLanguages()
Microsoft.VisualStudio.LanguageServices.UnitTests (9)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (7)
44ImmutableDictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)).Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))) 90ImmutableDictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)).Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))) 232Dim analyzerReference = New AnalyzerImageReference(New DiagnosticAnalyzer() {compiler, analyzer}.ToImmutableArray()) 322Public Function GetDiagnosticsForIdsAsync(project As Project, documentId As DocumentId, diagnosticIds As ImmutableHashSet(Of String), shouldIncludeAnalyzer As Func(Of DiagnosticAnalyzer, Boolean), includeLocalDocumentDiagnostics As Boolean, includeNonLocalDocumentDiagnostics As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetDiagnosticsForIdsAsync 326Public Function GetProjectDiagnosticsForIdsAsync(project As Project, diagnosticIds As ImmutableHashSet(Of String), shouldIncludeAnalyzer As Func(Of DiagnosticAnalyzer, Boolean), includeNonLocalDocumentDiagnostics As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetProjectDiagnosticsForIdsAsync
SolutionExplorer\CpsDiagnosticItemSourceTests.vb (2)
32Dim analyzers = New Dictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)) 36analyzers.Add(LanguageNames.VisualBasic, ImmutableArray.Create(Of DiagnosticAnalyzer)(New Microsoft.CodeAnalysis.VisualBasic.UseAutoProperty.VisualBasicUseAutoPropertyAnalyzer()))
Mvc.Analyzers.Test (4)
AttributesShouldNotBeAppliedToPageModelAnalyzerTest.cs (1)
392protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() => new[] { new AttributesShouldNotBeAppliedToPageModelAnalyzer() };
AvoidHtmlPartialAnalyzerTest.cs (1)
431protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() => new[] { new AvoidHtmlPartialAnalyzer() };
TagHelpersInCodeBlocksAnalyzerTest.cs (1)
917protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() => new[] { new TagHelpersInCodeBlocksAnalyzer() };
TopLevelParameterNameAnalyzerTest.cs (1)
605protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() => new[] { new TopLevelParameterNameAnalyzer() };
Mvc.Api.Analyzers.Test (2)
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (2)
13public MvcDiagnosticAnalyzerRunner(DiagnosticAnalyzer analyzer) 18public DiagnosticAnalyzer Analyzer { get; }
Roslyn.Diagnostics.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
Roslyn.Diagnostics.Analyzers.UnitTests (2)
RelaxTestNamingSuppressorTests.cs (2)
140protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers() 142foreach (var analyzer in base.GetDiagnosticAnalyzers())
Test.Utilities (12)
CSharpCodeFixVerifier`2.cs (1)
16where TAnalyzer : DiagnosticAnalyzer, new()
CSharpCodeFixVerifier`2+Test.cs (1)
18where TAnalyzer : DiagnosticAnalyzer, new()
CSharpSecurityCodeFixVerifier`2.cs (1)
16where TAnalyzer : DiagnosticAnalyzer, new()
CSharpSecurityCodeFixVerifier`2+Test.cs (1)
15where TAnalyzer : DiagnosticAnalyzer, new()
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)
VisualBasicCodeFixVerifier`2.cs (1)
15where TAnalyzer : DiagnosticAnalyzer, new()
VisualBasicCodeFixVerifier`2+Test.cs (1)
15where TAnalyzer : DiagnosticAnalyzer, new()
VisualBasicSecurityCodeFixVerifier`2.cs (1)
15where TAnalyzer : DiagnosticAnalyzer, new()
VisualBasicSecurityCodeFixVerifier`2+Test.cs (1)
14where TAnalyzer : DiagnosticAnalyzer, new()
Text.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\AdditionalFileProvider.cs (1)
32/// <param name="options">Options passed to a <see cref="DiagnosticAnalyzer"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\DiagnosticAnalyzerCategory.cs (1)
19/// Note: an <see cref="DiagnosticAnalyzer"/> that uses this will not work properly if
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
15public static bool IsCompilerAnalyzer(this DiagnosticAnalyzer analyzer)