1 instantiation of AnalyzerConfig
Microsoft.CodeAnalysis (1)
CommandLine\AnalyzerConfig.cs (1)
262return new AnalyzerConfig(globalSection!, namedSectionBuilder.ToImmutable(), pathToFile);
40 references to AnalyzerConfig
Microsoft.CodeAnalysis (34)
CommandLine\AnalyzerConfig.cs (5)
104/// Comparer for sorting <see cref="AnalyzerConfig"/> files by <see cref="NormalizedDirectory"/> path length. 106internal static Comparer<AnalyzerConfig> DirectoryLengthComparer { get; } = Comparer<AnalyzerConfig>.Create( 178public static AnalyzerConfig Parse(string text, string? pathToFile) 187public static AnalyzerConfig Parse(SourceText text, string? pathToFile)
CommandLine\AnalyzerConfigSet.cs (25)
18using static Microsoft.CodeAnalysis.AnalyzerConfig; 25/// Represents a set of <see cref="AnalyzerConfig"/>, and can compute the effective analyzer options for a given source file. This is used to 26/// collect all the <see cref="AnalyzerConfig"/> files for that would apply to a compilation. 31/// The list of <see cref="AnalyzerConfig" />s in this set. This list has been sorted per <see cref="AnalyzerConfig.DirectoryLengthComparer"/>. 34private readonly ImmutableArray<AnalyzerConfig> _analyzerConfigs; 40/// corresponds to each <see cref="AnalyzerConfig.NamedSections"/>. 121public static AnalyzerConfigSet Create<TList>(TList analyzerConfigs) where TList : IReadOnlyCollection<AnalyzerConfig> 126public static AnalyzerConfigSet Create<TList>(TList analyzerConfigs, out ImmutableArray<Diagnostic> diagnostics) where TList : IReadOnlyCollection<AnalyzerConfig> 128var sortedAnalyzerConfigs = ArrayBuilder<AnalyzerConfig>.GetInstance(analyzerConfigs.Count); 130sortedAnalyzerConfigs.Sort(AnalyzerConfig.DirectoryLengthComparer); 136private AnalyzerConfigSet(ImmutableArray<AnalyzerConfig> analyzerConfigs, GlobalAnalyzerConfig globalConfig) 143foreach (var config in _analyzerConfigs) 150SectionNameMatcher? matcher = AnalyzerConfig.TryCreateSectionNameMatcher(section.Name); 172/// Returns a <see cref="AnalyzerConfigOptionsResult"/> for a source file. This computes which <see cref="AnalyzerConfig"/> rules applies to this file, and correctly applies 206var config = _analyzerConfigs[analyzerConfigIndex]; 273AnalyzerConfig config = _analyzerConfigs[analyzerConfigIndex]; 450/// <param name="analyzerConfigs">An <see cref="ArrayBuilder{T}"/> of <see cref="AnalyzerConfig"/> containing a mix of regular and unmerged partial global configs</param> 453internal static GlobalAnalyzerConfig MergeGlobalConfigs(ArrayBuilder<AnalyzerConfig> analyzerConfigs, out ImmutableArray<Diagnostic> diagnostics) 483internal void MergeIntoGlobalConfig(AnalyzerConfig config, DiagnosticBag diagnostics) 636/// We parse all <see cref="AnalyzerConfig"/>s as individual files, according to the editorconfig spec. 644internal AnalyzerConfig.Section GlobalSection { get; } 646internal ImmutableArray<AnalyzerConfig.Section> NamedSections { get; } 648public GlobalAnalyzerConfig(AnalyzerConfig.Section globalSection, ImmutableArray<AnalyzerConfig.Section> namedSections)
CommandLine\CommonCompiler.cs (3)
289var configs = ArrayBuilder<AnalyzerConfig>.GetInstance(analyzerConfigPaths.Length); 307var editorConfig = AnalyzerConfig.Parse(fileContent, normalizedPath);
DiagnosticAnalyzer\AnalyzerConfigOptions.cs (1)
17public static StringComparer KeyComparer { get; } = AnalyzerConfig.Section.PropertiesKeyComparer;
Microsoft.CodeAnalysis.Workspaces (6)
Workspace\Solution\AnalyzerConfigDocumentState.cs (6)
15private readonly AsyncLazy<AnalyzerConfig> _lazyAnalyzerConfig; 23AsyncLazy<AnalyzerConfig>? lazyAnalyzerConfig = null) 27asynchronousComputeFunction: static async (self, cancellationToken) => AnalyzerConfig.Parse(await self.GetTextAsync(cancellationToken).ConfigureAwait(false), self.FilePath), 28synchronousComputeFunction: static (self, cancellationToken) => AnalyzerConfig.Parse(self.GetTextSynchronously(cancellationToken), self.FilePath), 79public AnalyzerConfig GetAnalyzerConfig(CancellationToken cancellationToken) 82public Task<AnalyzerConfig> GetAnalyzerConfigAsync(CancellationToken cancellationToken)