24 instantiations of AnalyzerOptions
Microsoft.Analyzers.Extra.Tests (1)
Resources\AnalyzerOptionsFactory.cs (1)
19return new AnalyzerOptions(immutableFiles);
Microsoft.Analyzers.Local.Tests (1)
Resources\AnalyzerOptionsFactory.cs (1)
19return new AnalyzerOptions(immutableFiles);
Microsoft.CodeAnalysis (3)
CommandLine\CommonCompiler.cs (1)
1546=> new Diagnostics.AnalyzerOptions(additionalTextFiles, analyzerConfigOptionsProvider);
DiagnosticAnalyzer\AnalyzerOptions.cs (2)
17internal static readonly AnalyzerOptions Empty = new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty); 63return new AnalyzerOptions(additionalFiles);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
166var options = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalText));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Diagnostics\DiagnosticAnalyzerTests.AllInOne.cs (3)
41var options = new AnalyzerOptions(new[] { new TestAdditionalText() }.ToImmutableArray<AdditionalText>()); 102var options = new AnalyzerOptions(new[] { new TestAdditionalText() }.ToImmutableArray<AdditionalText>()); 112AnalyzerOptions options = new AnalyzerOptions
Diagnostics\DiagnosticAnalyzerTests.cs (4)
3607new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty)); 3884var options = new AnalyzerOptions(ImmutableArray.Create(additionalFile)); 3924var options = new AnalyzerOptions(additionalFiles); 4316var analyzerOptions = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalTextFile));
Diagnostics\GetDiagnosticsTests.cs (4)
553var compilationWithAnalyzers = compilation.WithAnalyzers(analyzers, new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty)); 665new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty), 718new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty), 747new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Preview\PreviewWorkspaceTests.cs (1)
165var analyzerOptions = new AnalyzerOptions(additionalFiles: ImmutableArray<AdditionalText>.Empty);
Microsoft.CodeAnalysis.UnitTests (2)
Diagnostics\AnalysisContextInfoTests.cs (1)
29var options = new AnalyzerOptions(new[] { new TestAdditionalText() }.ToImmutableArray<AdditionalText>());
Diagnostics\CompilationWithAnalyzersTests.cs (1)
61var analyzerOptions = new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Diagnostics\DiagnosticAnalyzerTests.AllInOne.vb (3)
22Dim options = New AnalyzerOptions({DirectCast(New TestAdditionalText(), AdditionalText)}.ToImmutableArray()) 48Dim options = New AnalyzerOptions({CType(new TestAdditionalText(), AdditionalText)}.ToImmutableArray()) 57Dim options = New AnalyzerOptions(additionalTexts.ToImmutableArray())
Diagnostics\DiagnosticAnalyzerTests.vb (1)
1656Dim options = New AnalyzerOptions(ImmutableArray.Create(additionalFile))
226 references to AnalyzerOptions
BuildActionTelemetryTable (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions)
ILLink.RoslynAnalyzer (7)
AnalyzerOptionsExtensions.cs (2)
13 this AnalyzerOptions options, 23 this AnalyzerOptions options,
DataFlowAnalyzerContext.cs (1)
40 public static DataFlowAnalyzerContext Create (AnalyzerOptions options, Compilation compilation, ImmutableArray<RequiresAnalyzerBase> requiresAnalyzers)
RequiresAnalyzerBase.cs (1)
318 internal abstract bool IsAnalyzerEnabled (AnalyzerOptions options);
RequiresAssemblyFilesAnalyzer.cs (1)
55 internal override bool IsAnalyzerEnabled (AnalyzerOptions options)
RequiresDynamicCodeAnalyzer.cs (1)
46 internal override bool IsAnalyzerEnabled (AnalyzerOptions options) =>
RequiresUnreferencedCodeAnalyzer.cs (1)
67 internal override bool IsAnalyzerEnabled (AnalyzerOptions options) =>
Microsoft.Analyzers.Extra.Tests (3)
Resources\AnalyzerOptionsFactory.cs (1)
14public static AnalyzerOptions WithFiles(params string[] fileNames)
Resources\RoslynTestUtils.cs (2)
239AnalyzerOptions? options = null, 296AnalyzerOptions? analyzerOptions = null)
Microsoft.Analyzers.Local.Tests (5)
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (2)
30var options = AnalyzerOptionsFactory.WithFiles(fileName); 57var options = AnalyzerOptionsFactory.WithFiles(fileName);
Resources\AnalyzerOptionsFactory.cs (1)
14public static AnalyzerOptions WithFiles(params string[] fileNames)
Resources\RoslynTestUtils.cs (2)
239AnalyzerOptions? options = null, 297AnalyzerOptions? analyzerOptions = null)
Microsoft.CodeAnalysis (93)
CommandLine\CommonCompiler.cs (4)
1130AnalyzerOptions analyzerOptions = CreateAnalyzerOptions(additionalTextFiles, analyzerConfigProvider); 1213AnalyzerOptions analyzerOptions = CreateAnalyzerOptions( 1514(CancellationTokenSource, DiagnosticBag, AnalyzerDriver) initializeAnalyzerDriver(AnalyzerOptions analyzerOptions, ref Compilation compilation) 1543protected virtual Diagnostics.AnalyzerOptions CreateAnalyzerOptions(
DiagnosticAnalyzer\AnalysisScope.cs (3)
98var analyzerOptions = compilationWithAnalyzers.AnalysisOptions.Options; 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)
DiagnosticAnalyzer\AnalyzerDriver.cs (8)
511compilation, analysisOptions.Options ?? AnalyzerOptions.Empty, addNotCategorizedDiagnostic, newOnAnalyzerException, analysisOptions.AnalyzerExceptionFilter, 815AnalyzerOptions options, 835AnalyzerOptions options, 943AnalyzerOptions analyzerOptions, 1957internal static Action<Diagnostic, CancellationToken> GetDiagnosticSink(Action<Diagnostic> addDiagnosticCore, Compilation compilation, AnalyzerOptions? analyzerOptions, SeverityFilter severityFilter, ConcurrentSet<string>? suppressedDiagnosticIds) 1969internal static Action<Diagnostic, DiagnosticAnalyzer, bool, CancellationToken> GetDiagnosticSink(Action<Diagnostic, DiagnosticAnalyzer, bool> addLocalDiagnosticCore, Compilation compilation, AnalyzerOptions? analyzerOptions, SeverityFilter severityFilter, ConcurrentSet<string>? suppressedDiagnosticIds) 1981internal static Action<Diagnostic, DiagnosticAnalyzer, CancellationToken> GetDiagnosticSink(Action<Diagnostic, DiagnosticAnalyzer> addDiagnosticCore, Compilation compilation, AnalyzerOptions? analyzerOptions, SeverityFilter severityFilter, ConcurrentSet<string>? suppressedDiagnosticIds) 1993private static Diagnostic? GetFilteredDiagnostic(Diagnostic diagnostic, Compilation compilation, AnalyzerOptions? analyzerOptions, SeverityFilter severityFilter, ConcurrentSet<string>? suppressedDiagnosticIds, CancellationToken cancellationToken)
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
100AnalyzerOptions analyzerOptions, 132AnalyzerOptions analyzerOptions, 174internal AnalyzerOptions AnalyzerOptions { get; }
DiagnosticAnalyzer\AnalyzerOptions.cs (4)
17internal static readonly AnalyzerOptions Empty = new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty); 56public AnalyzerOptions WithAdditionalFiles(ImmutableArray<AdditionalText> additionalFiles) 73var other = obj as AnalyzerOptions;
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (1)
30this AnalyzerOptions? analyzerOptions,
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (7)
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) 515/// The given <paramref name="file"/> must be part of <see cref="AnalyzerOptions.AdditionalFiles"/> for the <see cref="AnalysisOptions"/> for this CompilationWithAnalyzers instance. 529/// The given <paramref name="file"/> must be part of <see cref="AnalyzerOptions.AdditionalFiles"/> for the <see cref="AnalysisOptions"/> for this CompilationWithAnalyzers instance. 546/// The given <paramref name="file"/> must be part of <see cref="AnalyzerOptions.AdditionalFiles"/> for the <see cref="AnalysisOptions"/> for this CompilationWithAnalyzers instance. 562/// The given <paramref name="file"/> must be part of <see cref="AnalyzerOptions.AdditionalFiles"/> for the <see cref="AnalysisOptions"/> for this CompilationWithAnalyzers instance.
DiagnosticAnalyzer\CompilationWithAnalyzersOptions.cs (5)
14private readonly AnalyzerOptions? _options; 24public AnalyzerOptions? Options => _options; 59AnalyzerOptions options, 76AnalyzerOptions options, 95AnalyzerOptions? options,
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (51)
325private readonly AnalyzerOptions _options; 336public AnalyzerOptions Options { get { return _options; } } 343protected CompilationStartAnalysisContext(Compilation compilation, AnalyzerOptions options, CancellationToken cancellationToken) 561private readonly AnalyzerOptions _options; 575public AnalyzerOptions Options { get { return _options; } } 583public CompilationAnalysisContext(Compilation compilation, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 590AnalyzerOptions options, 684private readonly AnalyzerOptions _options; 697public AnalyzerOptions Options { get { return _options; } } 722public SemanticModelAnalysisContext(SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 729AnalyzerOptions options, 768private readonly AnalyzerOptions _options; 786public AnalyzerOptions Options { get { return _options; } } 815public SymbolAnalysisContext(ISymbol symbol, Compilation compilation, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 823AnalyzerOptions options, 877public AnalyzerOptions Options { get; } 904public SymbolStartAnalysisContext(ISymbol symbol, Compilation compilation, AnalyzerOptions options, CancellationToken cancellationToken) 909internal SymbolStartAnalysisContext(ISymbol symbol, Compilation compilation, AnalyzerOptions options, bool isGeneratedCode, SyntaxTree? filterTree, TextSpan? filterSpan, CancellationToken cancellationToken) 1023private readonly AnalyzerOptions _options; 1044public AnalyzerOptions Options { get { return _options; } } 1069protected CodeBlockStartAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, CancellationToken cancellationToken) 1078AnalyzerOptions options, 1131private readonly AnalyzerOptions _options; 1154public AnalyzerOptions Options { get { return _options; } } 1179public CodeBlockAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1188AnalyzerOptions options, 1239private readonly AnalyzerOptions _options; 1264public AnalyzerOptions Options => _options; 1293AnalyzerOptions options, 1304AnalyzerOptions options, 1379private readonly AnalyzerOptions _options; 1406public AnalyzerOptions Options => _options; 1435AnalyzerOptions options, 1448AnalyzerOptions options, 1511private readonly AnalyzerOptions _options; 1524public AnalyzerOptions Options => _options; 1546public SyntaxTreeAnalysisContext(SyntaxTree tree, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1553AnalyzerOptions options, 1602public AnalyzerOptions Options { get; } 1623AnalyzerOptions options, 1663private readonly AnalyzerOptions _options; 1691public AnalyzerOptions Options => _options; 1716public SyntaxNodeAnalysisContext(SyntaxNode node, ISymbol? containingSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1722public SyntaxNodeAnalysisContext(SyntaxNode node, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1731AnalyzerOptions options, 1773private readonly AnalyzerOptions _options; 1797public AnalyzerOptions Options => _options; 1826AnalyzerOptions options, 1838AnalyzerOptions options, 1907public AnalyzerOptions Options { get; } 1916AnalyzerOptions options,
DiagnosticAnalyzer\DiagnosticAnalyzerExtensions.cs (3)
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)
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (4)
132AnalyzerOptions options, 231AnalyzerOptions options, 296AnalyzerOptions options, 330AnalyzerOptions options,
Microsoft.CodeAnalysis.CodeStyle (22)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (4)
87protected static bool IsAnalysisLevelGreaterThanOrEquals(int minAnalysisLevel, AnalyzerOptions analyzerOptions) 110AnalyzerOptions analyzerOptions, 118AnalyzerOptions analyzerOptions, 148AnalyzerOptions analyzerOptions,
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (8)
44AnalyzerOptions analyzerOptions, 92AnalyzerOptions analyzerOptions, 111AnalyzerOptions analyzerOptions, 160AnalyzerOptions analyzerOptions, 181AnalyzerOptions analyzerOptions, 207AnalyzerOptions analyzerOptions, 259AnalyzerOptions analyzerOptions, 287static IEnumerable<string> GetEffectiveCustomTags(DiagnosticDescriptor descriptor, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
207(bool isCandidate, bool written) TryGetOrInitializeFieldState(IFieldSymbol fieldSymbol, AnalyzerOptions options, CancellationToken cancellationToken) 222AnalyzerOptions options, 299private static CodeStyleOption2<bool> GetCodeStyleOption(IFieldSymbol field, AnalyzerOptions options, out Location diagnosticLocation)
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
115AnalyzerOptions options,
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
202private bool TryGetOptions(SyntaxTree syntaxTree, AnalyzerOptions analyzerOptions, CompilationOptions compilationOptions, CancellationToken cancellationToken, out Options options)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
123AnalyzerOptions analyzerOptions,
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (2)
114public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) 135internal static Diagnostic CreateDiagnostic(SemanticModel model, TSimplifierOptions options, AnalyzerOptions analyzerOptions, TextSpan issueSpan, string diagnosticId, bool inDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
228public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\AnalyzerOptionsProviders.cs (1)
17var analyzerOptions = document.Project.AnalyzerOptions;
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (2)
39var analyzerOptions = context.Options; 72LambdaExpressionSyntax declaration, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
58private static Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, SyntaxNode declaration, TextSpan diagnosticSpan, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
311private Diagnostic CreateDiagnostic(Result result, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
210var options = context.Options;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
166var options = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalText));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (20)
Diagnostics\DiagnosticAnalyzerTests.AllInOne.cs (3)
41var options = new AnalyzerOptions(new[] { new TestAdditionalText() }.ToImmutableArray<AdditionalText>()); 102var options = new AnalyzerOptions(new[] { new TestAdditionalText() }.ToImmutableArray<AdditionalText>()); 112AnalyzerOptions options = new AnalyzerOptions
Diagnostics\DiagnosticAnalyzerTests.cs (7)
1532var analyzerOptions = new AnalyzerOptions(additionalFiles: ImmutableArray<AdditionalText>.Empty, analyzerConfigOptionsProvider); 1693private static void VerifyGeneratedCodeAnalyzerDiagnostics(Compilation compilation, AnalyzerOptions analyzerOptions, Func<string, bool> isGeneratedFileName, GeneratedCodeAnalysisFlags? generatedCodeAnalysisFlagsOpt) 1699private static void VerifyGeneratedCodeAnalyzerDiagnostics(Compilation compilation, DiagnosticDescription[] expected, GeneratedCodeAnalysisFlags? generatedCodeAnalysisFlagsOpt, AnalyzerOptions analyzerOptions = null, bool testIsGeneratedCodeInCallbacks = false) 3884var options = new AnalyzerOptions(ImmutableArray.Create(additionalFile)); 3924var options = new AnalyzerOptions(additionalFiles); 4316var analyzerOptions = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalTextFile)); 4399var driver = AnalyzerDriver.CreateAndAttachToCompilation(compilation, analyzersArray, AnalyzerOptions.Empty, analyzerManager, onAnalyzerException: null,
Diagnostics\DiagnosticSuppressorTests.cs (1)
714var options = new CompilationWithAnalyzersOptions(AnalyzerOptions.Empty, onAnalyzerException: null, concurrentAnalysis: true, logAnalyzerExecutionTime: true, reportSuppressedDiagnostics: true);
Diagnostics\GetDiagnosticsTests.cs (9)
562var analyzerOptions = new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty, analyzerConfigOptionsProvider); 601AnalyzerOptions analyzerOptions; 785var compilationWithAnalyzers = compilation.WithAnalyzers(analyzers, AnalyzerOptions.Empty); 838var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1064var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(compilerAnalyzer), AnalyzerOptions.Empty); 1124var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1458var options = new CompilationWithAnalyzersOptions(AnalyzerOptions.Empty, onAnalyzerException: null, 1519var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1698var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty);
Microsoft.CodeAnalysis.CSharp.Features (7)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (2)
44private readonly AnalyzerOptions _analyzerOptions; 73public TypeSyntaxSimplifierWalker(CSharpSimplifyTypeNamesDiagnosticAnalyzer analyzer, SemanticModel semanticModel, CSharpSimplifierOptions options, AnalyzerOptions analyzerOptions, TextSpanMutableIntervalTree? ignoredSpans, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (2)
39var analyzerOptions = context.Options; 72LambdaExpressionSyntax declaration, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
58private static Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, SyntaxNode declaration, TextSpan diagnosticSpan, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
311private Diagnostic CreateDiagnostic(Result result, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
210var options = context.Options;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
MockCSharpCompiler.cs (2)
23internal AnalyzerOptions AnalyzerOptions; 94protected override AnalyzerOptions CreateAnalyzerOptions(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Preview\PreviewWorkspaceTests.cs (1)
165var analyzerOptions = new AnalyzerOptions(additionalFiles: ImmutableArray<AdditionalText>.Empty);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
80Private Shared Function IsSerializationAllowed(options As AnalyzerOptions) As Boolean
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
Analyzers\OmniSharpWorkspaceAnalyzerOptionsFactory.cs (2)
12public static AnalyzerOptions Create(Solution solution, AnalyzerOptions options)
Microsoft.CodeAnalysis.Features (21)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (4)
87protected static bool IsAnalysisLevelGreaterThanOrEquals(int minAnalysisLevel, AnalyzerOptions analyzerOptions) 110AnalyzerOptions analyzerOptions, 118AnalyzerOptions analyzerOptions, 148AnalyzerOptions analyzerOptions,
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (8)
44AnalyzerOptions analyzerOptions, 92AnalyzerOptions analyzerOptions, 111AnalyzerOptions analyzerOptions, 160AnalyzerOptions analyzerOptions, 181AnalyzerOptions analyzerOptions, 207AnalyzerOptions analyzerOptions, 259AnalyzerOptions analyzerOptions, 287static IEnumerable<string> GetEffectiveCustomTags(DiagnosticDescriptor descriptor, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
207(bool isCandidate, bool written) TryGetOrInitializeFieldState(IFieldSymbol fieldSymbol, AnalyzerOptions options, CancellationToken cancellationToken) 222AnalyzerOptions options, 299private static CodeStyleOption2<bool> GetCodeStyleOption(IFieldSymbol field, AnalyzerOptions options, out Location diagnosticLocation)
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
115AnalyzerOptions options,
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
202private bool TryGetOptions(SyntaxTree syntaxTree, AnalyzerOptions analyzerOptions, CompilationOptions compilationOptions, CancellationToken cancellationToken, out Options options)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
123AnalyzerOptions analyzerOptions,
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (2)
114public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) 135internal static Diagnostic CreateDiagnostic(SemanticModel model, TSimplifierOptions options, AnalyzerOptions analyzerOptions, TextSpan issueSpan, string diagnosticId, bool inDeclaration)
src\Analyzers\Core\CodeFixes\AnalyzerOptionsProviders.cs (1)
17var analyzerOptions = document.Project.AnalyzerOptions;
Microsoft.CodeAnalysis.Test.Utilities (16)
Diagnostics\DiagnosticExtensions.cs (8)
155AnalyzerOptions options = null, 167AnalyzerOptions options = null, 180AnalyzerOptions options = null, 192AnalyzerOptions options = null, 204AnalyzerOptions options = null, 226AnalyzerOptions options, 284AnalyzerOptions options = null, 298AnalyzerOptions options,
Diagnostics\OptionsDiagnosticAnalyzer.cs (7)
18private readonly AnalyzerOptions _expectedOptions; 19private readonly Dictionary<string, AnalyzerOptions> _mismatchedOptions = new Dictionary<string, AnalyzerOptions>(); 21public OptionsDiagnosticAnalyzer(AnalyzerOptions expectedOptions) 31protected override void OnOptions(AnalyzerOptions options, [CallerMemberName] string callerName = null) 48private bool AreEqual(AnalyzerOptions actual, AnalyzerOptions expected)
Diagnostics\TestDiagnosticAnalyzer.cs (1)
34protected virtual void OnOptions(AnalyzerOptions options, [CallerMemberName] string callerName = null) { }
Microsoft.CodeAnalysis.UnitTests (4)
Diagnostics\AnalysisContextInfoTests.cs (2)
29var options = new AnalyzerOptions(new[] { new TestAdditionalText() }.ToImmutableArray<AdditionalText>()); 44private static void Verify(Compilation compilation, AnalyzerOptions options, string context)
Diagnostics\CompilationWithAnalyzersTests.cs (1)
61var analyzerOptions = new AnalyzerOptions(ImmutableArray<AdditionalText>.Empty);
Diagnostics\DiagnosticLocalizationTests.cs (1)
307var analyzerExecutor = AnalyzerExecutor.Create(compilation, AnalyzerOptions.Empty,
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (2)
42Private ReadOnly _analyzerOptions As AnalyzerOptions 72Public Sub New(analyzer As VisualBasicSimplifyTypeNamesDiagnosticAnalyzer, semanticModel As SemanticModel, options As VisualBasicSimplifierOptions, analyzerOptions As AnalyzerOptions, ignoredSpans As TextSpanMutableIntervalTree, cancellationToken As CancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
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 (2)
MockVisualBasicCompiler.vb (2)
19Public AnalyzerOptions As AnalyzerOptions 85analyzerConfigOptionsProvider As AnalyzerConfigOptionsProvider) As AnalyzerOptions
Microsoft.CodeAnalysis.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
228public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
Workspace\Solution\Project.cs (2)
150public AnalyzerOptions AnalyzerOptions => State.ProjectAnalyzerOptions; 155public AnalyzerOptions HostAnalyzerOptions => State.HostAnalyzerOptions;
Workspace\Solution\ProjectState.cs (4)
63private AnalyzerOptions? _lazyProjectAnalyzerOptions; 65private AnalyzerOptions? _lazyHostAnalyzerOptions; 335public AnalyzerOptions ProjectAnalyzerOptions 343public AnalyzerOptions HostAnalyzerOptions