Add basic project system support for analyzers.
This change adds a new interface, IAnalyzerHost, implemented by the C# and VB project system shims. A future change will update vbproj.dll and csproj.dll to call the methods in this interface to inform us of <Analyzer> and <RuleSet> items in project files. There are a few missing pieces of functionality that will be filled in later: 1.) We end up loading the analyzer assemblies on the UI thread as soon as AddAnalyzerAssembly is called. This may cause undesirable pauses while loading a project or changing settings. Ideally we would just pass in information about the analyzers and the workspace layer would handle the actual assembly loading. 2.) We don't yet hook up file change listeners for the ruleset files. Ideally we would hook up a listener to the ruleset file and the transitive set of other ruleset files it includes, and reload the rules whenever one of them changes on disk. 3.) The information about analyzers is not currently being passed from the host to the workspace. (changeset 1210973)
Showing
想要评论请 注册 或 登录