Skip to content

XAML: Provide better support for AdditionalFiles analyzers #44131

@mgoertz-msft

Description

@mgoertz-msft

Problem
Currently the only way to create analyzers for additional files is via RegisterCompilationStartAction for example and accessing them via AnalyzerOptions.AdditionalFiles. Unfortunately this means that there is no way for analyzer optimizations, such as running only for a currently open additional document for example. This places the burden of any potential optimizations on each analyzer implementation and could result in performance problems.

Justification
With the internal DocumentDiagnosticAnalyzers being frowned upon and eventually going away an official replacement solution for additional files is needed to support analyzers for non-core Roslyn languages such as XAML.

Ask
Provide support for something like an AdditionalDocumentDiagnosticAnalyzer for example that can be optimized for additional files scenarios.

Metadata

Metadata

Assignees

Labels

4 - In ReviewA fix for the issue is submitted for review.Area-AnalyzersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.Feature Request

Type

No type

Projects

Status

Complete

Relationships

None yet

Development

No branches or pull requests

Issue actions