Skip to content

Commit c99aae3

Browse files
authored
Improve AnalysisService and PSScriptAnalyzer integration (#1179)
- Allows on-demand disabling of the AnalysisService when the configuration changes - Adds a ConfigurationChanged event so that things to can subscribe to it early on - Decouples the analysis service from the engine running the analysis - Improves cancellation of script analysis, so that requests are more easily cancelled by the server and when a new request is received - Moves some analysis-specific logic to within the analysis service - Improve code-action handling, fixing them on Windows and improving how we pass around diagnostic information between requests
1 parent fdb5d71 commit c99aae3

File tree

12 files changed

+848
-847
lines changed

12 files changed

+848
-847
lines changed

src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,7 @@ public static IServiceCollection AddPsesLanguageServices(
4343
.Wait();
4444
return extensionService;
4545
})
46-
.AddSingleton<AnalysisService>(
47-
(provider) =>
48-
{
49-
return AnalysisService.Create(
50-
provider.GetService<ConfigurationService>(),
51-
provider.GetService<OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServer>(),
52-
provider.GetService<ILoggerFactory>().CreateLogger<AnalysisService>());
53-
});
46+
.AddSingleton<AnalysisService>();
5447
}
5548

5649
public static IServiceCollection AddPsesDebugServices(

src/PowerShellEditorServices/Services/Analysis/AnalysisService.cs

Lines changed: 252 additions & 749 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)