diff --git a/src/PowerShellEditorServices/Logging/PsesTelemetryEvent.cs b/src/PowerShellEditorServices/Logging/PsesTelemetryEvent.cs new file mode 100644 index 000000000..4d55320be --- /dev/null +++ b/src/PowerShellEditorServices/Logging/PsesTelemetryEvent.cs @@ -0,0 +1,41 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Collections.Generic; +using Newtonsoft.Json.Linq; + +namespace Microsoft.PowerShell.EditorServices.Logging +{ + // This inheirits from Dictionary so that it can be passed in to SendTelemetryEvent() + // which takes in an IDictionary + // However, I wanted creation to be easy so you can do + // new PsesTelemetryEvent { EventName = "eventName", Data = data } + internal class PsesTelemetryEvent : Dictionary + { + public string EventName + { + get + { + return this["EventName"].ToString() ?? "PsesEvent"; + } + set + { + this["EventName"] = value; + } + } + + public JObject Data + { + get + { + return this["Data"] as JObject ?? new JObject(); + } + set + { + this["Data"] = value; + } + } + } +} diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/GetCommandHandler.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/GetCommandHandler.cs index 8ece12bc6..5c5ef52d6 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/GetCommandHandler.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/GetCommandHandler.cs @@ -14,7 +14,7 @@ namespace Microsoft.PowerShell.EditorServices.Handlers { - [Serial, Method("powerShell/getCommand")] + [Serial, Method("powerShell/getCommand", Direction.ClientToServer)] internal interface IGetCommandHandler : IJsonRpcRequestHandler> { } internal class GetCommandParams : IRequest> { } diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/ITemplateHandlers.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/ITemplateHandlers.cs index 96f725510..faae4ceba 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/ITemplateHandlers.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Handlers/ITemplateHandlers.cs @@ -8,10 +8,12 @@ namespace Microsoft.PowerShell.EditorServices.Handlers { - [Serial, Method("powerShell/getProjectTemplates")] + [Serial] + [Method("powerShell/getProjectTemplates", Direction.ClientToServer)] internal interface IGetProjectTemplatesHandler : IJsonRpcRequestHandler { } - [Serial, Method("powerShell/newProjectFromTemplate")] + [Serial] + [Method("powerShell/newProjectFromTemplate", Direction.ClientToServer)] internal interface INewProjectFromTemplateHandler : IJsonRpcRequestHandler { } internal class GetProjectTemplatesRequest : IRequest diff --git a/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs b/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs index 8d94f1a7b..d340a54fe 100644 --- a/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs +++ b/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs @@ -5,16 +5,20 @@ using System; using System.Collections.Generic; +using System.IO; using System.Threading; using System.Threading.Tasks; +using MediatR; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Logging; using Microsoft.PowerShell.EditorServices.Services; using Microsoft.PowerShell.EditorServices.Services.Configuration; -using MediatR; +using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; +using OmniSharp.Extensions.LanguageServer.Protocol.Server; +using OmniSharp.Extensions.LanguageServer.Protocol.Window; using OmniSharp.Extensions.LanguageServer.Protocol.Workspace; -using System.IO; namespace Microsoft.PowerShell.EditorServices.Handlers { @@ -24,6 +28,7 @@ internal class PsesConfigurationHandler : IDidChangeConfigurationHandler private readonly WorkspaceService _workspaceService; private readonly ConfigurationService _configurationService; private readonly PowerShellContextService _powerShellContextService; + private readonly ILanguageServerFacade _languageServer; private DidChangeConfigurationCapability _capability; private bool _profilesLoaded; private bool _consoleReplStarted; @@ -34,13 +39,14 @@ public PsesConfigurationHandler( WorkspaceService workspaceService, AnalysisService analysisService, ConfigurationService configurationService, - PowerShellContextService powerShellContextService) + PowerShellContextService powerShellContextService, + ILanguageServerFacade languageServer) { _logger = factory.CreateLogger(); _workspaceService = workspaceService; _configurationService = configurationService; _powerShellContextService = powerShellContextService; - + _languageServer = languageServer; ConfigurationUpdated += analysisService.OnConfigurationUpdated; } @@ -57,6 +63,8 @@ public async Task Handle(DidChangeConfigurationParams request, Cancellatio return await Unit.Task.ConfigureAwait(false); } + SendFeatureChangesTelemetry(incomingSettings); + bool oldLoadProfiles = _configurationService.CurrentSettings.EnableProfileLoading; bool oldScriptAnalysisEnabled = _configurationService.CurrentSettings.ScriptAnalysis.Enable ?? false; @@ -141,6 +149,61 @@ await _powerShellContextService.SetWorkingDirectoryAsync( return await Unit.Task.ConfigureAwait(false); } + private void SendFeatureChangesTelemetry(LanguageServerSettingsWrapper incomingSettings) + { + var configChanges = new Dictionary(); + // Send telemetry if the user opted-out of ScriptAnalysis + if (incomingSettings.Powershell.ScriptAnalysis.Enable == false && + _configurationService.CurrentSettings.ScriptAnalysis.Enable != incomingSettings.Powershell.ScriptAnalysis.Enable) + { + configChanges["ScriptAnalysis"] = incomingSettings.Powershell.ScriptAnalysis.Enable ?? false; + } + + // Send telemetry if the user opted-out of CodeFolding + if (!incomingSettings.Powershell.CodeFolding.Enable && + _configurationService.CurrentSettings.CodeFolding.Enable != incomingSettings.Powershell.CodeFolding.Enable) + { + configChanges["CodeFolding"] = incomingSettings.Powershell.CodeFolding.Enable; + } + + // Send telemetry if the user opted-out of the prompt to update PackageManagement + if (!incomingSettings.Powershell.PromptToUpdatePackageManagement && + _configurationService.CurrentSettings.PromptToUpdatePackageManagement != incomingSettings.Powershell.PromptToUpdatePackageManagement) + { + configChanges["PromptToUpdatePackageManagement"] = incomingSettings.Powershell.PromptToUpdatePackageManagement; + } + + // Send telemetry if the user opted-out of Profile loading + if (!incomingSettings.Powershell.EnableProfileLoading && + _configurationService.CurrentSettings.EnableProfileLoading != incomingSettings.Powershell.EnableProfileLoading) + { + configChanges["ProfileLoading"] = incomingSettings.Powershell.EnableProfileLoading; + } + + // Send telemetry if the user opted-in to Pester 5+ CodeLens + if (!incomingSettings.Powershell.Pester.UseLegacyCodeLens && + _configurationService.CurrentSettings.Pester.UseLegacyCodeLens != incomingSettings.Powershell.Pester.UseLegacyCodeLens) + { + // From our perspective we want to see how many people are opting in to this so we flip the value + configChanges["Pester5CodeLens"] = !incomingSettings.Powershell.Pester.UseLegacyCodeLens; + } + + // No need to send any telemetry since nothing changed + if (configChanges.Count == 0) + { + return; + } + + _languageServer.Window.SendTelemetryEvent(new TelemetryEventParams + { + Data = new PsesTelemetryEvent + { + EventName = "NonDefaultPsesFeatureConfiguration", + Data = JObject.FromObject(configChanges) + } + }); + } + public void SetCapability(DidChangeConfigurationCapability capability) { _capability = capability; diff --git a/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs b/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs index 627e4f57a..f6b1b3314 100644 --- a/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs +++ b/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs @@ -18,9 +18,10 @@ namespace Microsoft.PowerShell.EditorServices.Services.Configuration internal class LanguageServerSettings { private readonly object updateLock = new object(); - public bool EnableProfileLoading { get; set; } - public bool PromptToUpdatePackageManagement { get; set; } + public bool EnableProfileLoading { get; set; } = true; + + public bool PromptToUpdatePackageManagement { get; set; } = true; public ScriptAnalysisSettings ScriptAnalysis { get; set; } diff --git a/test/PowerShellEditorServices.Test.E2E/LSPTestsFixures.cs b/test/PowerShellEditorServices.Test.E2E/LSPTestsFixures.cs index 168c8d261..6fffa344c 100644 --- a/test/PowerShellEditorServices.Test.E2E/LSPTestsFixures.cs +++ b/test/PowerShellEditorServices.Test.E2E/LSPTestsFixures.cs @@ -10,6 +10,8 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Logging; +using Microsoft.PowerShell.EditorServices.Services.Configuration; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Client; using OmniSharp.Extensions.LanguageServer.Protocol; @@ -29,7 +31,7 @@ public class LSPTestsFixture : TestsFixture public ILanguageClient PsesLanguageClient { get; private set; } public List Diagnostics { get; set; } - + internal List TelemetryEvents { get; set; } public ITestOutputHelper Output { get; set; } public async override Task CustomInitializeAsync( @@ -38,6 +40,7 @@ public async override Task CustomInitializeAsync( Stream outputStream) { Diagnostics = new List(); + TelemetryEvents = new List(); DirectoryInfo testdir = Directory.CreateDirectory(Path.Combine(s_binDir, Path.GetRandomFileName())); @@ -48,7 +51,13 @@ public async override Task CustomInitializeAsync( .WithOutput(outputStream) .WithRootUri(DocumentUri.FromFileSystemPath(testdir.FullName)) .OnPublishDiagnostics(diagnosticParams => Diagnostics.AddRange(diagnosticParams.Diagnostics.Where(d => d != null))) - .OnLogMessage(logMessageParams => Output?.WriteLine($"{logMessageParams.Type.ToString()}: {logMessageParams.Message}")); + .OnLogMessage(logMessageParams => Output?.WriteLine($"{logMessageParams.Type.ToString()}: {logMessageParams.Message}")) + .OnTelemetryEvent(telemetryEventParams => TelemetryEvents.Add( + new PsesTelemetryEvent + { + EventName = (string) telemetryEventParams.Data["eventName"], + Data = telemetryEventParams.Data["data"] as JObject + })); // Enable all capabilities this this is for testing. // This will be a built in feature of the Omnisharp client at some point. @@ -63,18 +72,16 @@ public async override Task CustomInitializeAsync( await PsesLanguageClient.Initialize(CancellationToken.None).ConfigureAwait(false); // Make sure Script Analysis is enabled because we'll need it in the tests. + // This also makes sure the configuration is set to default values. PsesLanguageClient.Workspace.DidChangeConfiguration( new DidChangeConfigurationParams { - Settings = JObject.Parse(@" -{ - ""powershell"": { - ""scriptAnalysis"": { - ""enable"": true - } - } -} -") + Settings = JToken.FromObject(new LanguageServerSettingsWrapper + { + Files = new EditorFileSettings(), + Search = new EditorSearchSettings(), + Powershell = new LanguageServerSettings() + }) }); } diff --git a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs index 5a15aac66..2655f2927 100644 --- a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs +++ b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs @@ -13,6 +13,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.PowerShell.EditorServices.Handlers; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Protocol; using OmniSharp.Extensions.LanguageServer.Protocol.Client; @@ -23,6 +24,8 @@ using Xunit; using Xunit.Abstractions; using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range; +using Microsoft.PowerShell.EditorServices.Logging; +using Microsoft.PowerShell.EditorServices.Services.Configuration; namespace PowerShellEditorServices.Test.E2E { @@ -35,6 +38,7 @@ public class LanguageServerProtocolMessageTests : IClassFixture private readonly ILanguageClient PsesLanguageClient; private readonly List Diagnostics; + private readonly List TelemetryEvents; private readonly string PwshExe; public LanguageServerProtocolMessageTests(ITestOutputHelper output, LSPTestsFixture data) @@ -43,6 +47,8 @@ public LanguageServerProtocolMessageTests(ITestOutputHelper output, LSPTestsFixt PsesLanguageClient = data.PsesLanguageClient; Diagnostics = data.Diagnostics; Diagnostics.Clear(); + TelemetryEvents = data.TelemetryEvents; + TelemetryEvents.Clear(); PwshExe = TestsFixture.PwshExe; } @@ -50,6 +56,7 @@ public LanguageServerProtocolMessageTests(ITestOutputHelper output, LSPTestsFixt public void Dispose() { Diagnostics.Clear(); + TelemetryEvents.Clear(); } private string NewTestFile(string script, bool isPester = false, string languageId = "powershell") @@ -75,7 +82,7 @@ private string NewTestFile(string script, bool isPester = false, string language return filePath; } - private async Task WaitForDiagnostics() + private async Task WaitForDiagnosticsAsync() { // Wait for PSSA to finish. int i = 0; @@ -91,8 +98,24 @@ private async Task WaitForDiagnostics() } } + private async Task WaitForTelemetryEventsAsync() + { + // Wait for PSSA to finish. + int i = 0; + while(TelemetryEvents.Count == 0) + { + if(i >= 10) + { + throw new InvalidDataException("No telemetry events showed up after 20s."); + } + + await Task.Delay(2000); + i++; + } + } + [Fact] - public async Task CanSendPowerShellGetVersionRequest() + public async Task CanSendPowerShellGetVersionRequestAsync() { PowerShellVersion details = await PsesLanguageClient @@ -140,7 +163,7 @@ public async Task CanReceiveDiagnosticsFromFileOpen() "Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load."); NewTestFile("$a = 4"); - await WaitForDiagnostics(); + await WaitForDiagnosticsAsync(); Diagnostic diagnostic = Assert.Single(Diagnostics); Assert.Equal("PSUseDeclaredVarsMoreThanAssignments", diagnostic.Code); @@ -156,14 +179,14 @@ public async Task WontReceiveDiagnosticsFromFileOpenThatIsNotPowerShell() } [SkippableFact] - public async Task CanReceiveDiagnosticsFromFileChanged() + public async Task CanReceiveDiagnosticsFromFileChangedAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode && TestsFixture.IsWindowsPowerShell, "Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load."); string filePath = NewTestFile("$a = 4"); - await WaitForDiagnostics(); + await WaitForDiagnosticsAsync(); Diagnostics.Clear(); PsesLanguageClient.SendNotification("textDocument/didChange", new DidChangeTextDocumentParams @@ -191,7 +214,7 @@ public async Task CanReceiveDiagnosticsFromFileChanged() } }); - await WaitForDiagnostics(); + await WaitForDiagnosticsAsync(); if (Diagnostics.Count > 1) { StringBuilder errorBuilder = new StringBuilder().AppendLine("Multiple diagnostics found when there should be only 1:"); @@ -208,56 +231,67 @@ public async Task CanReceiveDiagnosticsFromFileChanged() } [SkippableFact] - public async Task CanReceiveDiagnosticsFromConfigurationChange() + public async Task CanReceiveDiagnosticsFromConfigurationChangeAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode && TestsFixture.IsWindowsPowerShell, "Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load."); NewTestFile("gci | % { $_ }"); - await WaitForDiagnostics(); + await WaitForDiagnosticsAsync(); // NewTestFile doesn't clear diagnostic notifications so we need to do that for this test. Diagnostics.Clear(); - try - { - PsesLanguageClient.SendNotification("workspace/didChangeConfiguration", + PsesLanguageClient.SendNotification("workspace/didChangeConfiguration", new DidChangeConfigurationParams { - Settings = JToken.Parse(@" -{ - ""powershell"": { - ""scriptAnalysis"": { - ""enable"": false - } - } -} -") + Settings = JToken.FromObject(new LanguageServerSettingsWrapper + { + Files = new EditorFileSettings(), + Search = new EditorSearchSettings(), + Powershell = new LanguageServerSettings + { + ScriptAnalysis = new ScriptAnalysisSettings + { + Enable = false + } + } + }) }); - Assert.Empty(Diagnostics); - } - finally - { - PsesLanguageClient.SendNotification("workspace/didChangeConfiguration", + await WaitForTelemetryEventsAsync().ConfigureAwait(false); + var telemetryEvent = Assert.Single(TelemetryEvents); + Assert.Equal("NonDefaultPsesFeatureConfiguration", telemetryEvent.EventName); + Assert.False((bool)telemetryEvent.Data.GetValue("ScriptAnalysis")); + + // We also shouldn't get any Diagnostics because ScriptAnalysis is disabled. + Assert.Empty(Diagnostics); + + // Clear telemetry events so we can test to make sure telemetry doesn't + // come through with default settings. + TelemetryEvents.Clear(); + + // Restore default configuration + PsesLanguageClient.SendNotification("workspace/didChangeConfiguration", new DidChangeConfigurationParams { - Settings = JToken.Parse(@" -{ - ""powershell"": { - ""scriptAnalysis"": { - ""enable"": true - } - } -} -") + Settings = JToken.FromObject(new LanguageServerSettingsWrapper + { + Files = new EditorFileSettings(), + Search = new EditorSearchSettings(), + Powershell = new LanguageServerSettings() + }) }); - } + + // Wait a bit to make sure no telemetry events came through + await Task.Delay(2000); + // Since we have default settings we should not get any telemetry events about + Assert.Empty(TelemetryEvents.Where(e => e.EventName == "NonDefaultPsesFeatureConfiguration")); } [Fact] - public async Task CanSendFoldingRangeRequest() + public async Task CanSendFoldingRangeRequestAsync() { string scriptPath = NewTestFile(@"gci | % { $_ @@ -298,7 +332,7 @@ await PsesLanguageClient } [SkippableFact] - public async Task CanSendFormattingRequest() + public async Task CanSendFormattingRequestAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode && TestsFixture.IsWindowsPowerShell, @@ -335,7 +369,7 @@ public async Task CanSendFormattingRequest() } [SkippableFact] - public async Task CanSendRangeFormattingRequest() + public async Task CanSendRangeFormattingRequestAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode && TestsFixture.IsWindowsPowerShell, @@ -385,7 +419,7 @@ public async Task CanSendRangeFormattingRequest() } [Fact] - public async Task CanSendDocumentSymbolRequest() + public async Task CanSendDocumentSymbolRequestAsync() { string scriptPath = NewTestFile(@" function CanSendDocumentSymbolRequest { @@ -420,7 +454,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendReferencesRequest() + public async Task CanSendReferencesRequestAsync() { string scriptPath = NewTestFile(@" function CanSendReferencesRequest { @@ -472,7 +506,7 @@ function CanSendReferencesRequest { } [Fact] - public async Task CanSendDocumentHighlightRequest() + public async Task CanSendDocumentHighlightRequestAsync() { string scriptPath = NewTestFile(@" Write-Host 'Hello!' @@ -519,7 +553,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendPowerShellGetPSHostProcessesRequest() + public async Task CanSendPowerShellGetPSHostProcessesRequestAsync() { var process = new Process(); process.StartInfo.FileName = PwshExe; @@ -560,7 +594,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendPowerShellGetRunspaceRequest() + public async Task CanSendPowerShellGetRunspaceRequestAsync() { var process = new Process(); process.StartInfo.FileName = PwshExe; @@ -603,7 +637,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendPesterLegacyCodeLensRequest() + public async Task CanSendPesterLegacyCodeLensRequestAsync() { // Make sure LegacyCodeLens is enabled because we'll need it in this test. PsesLanguageClient.Workspace.DidChangeConfiguration( @@ -668,7 +702,7 @@ public async Task CanSendPesterLegacyCodeLensRequest() } [Fact] - public async Task CanSendPesterCodeLensRequest() + public async Task CanSendPesterCodeLensRequestAsync() { // Make sure Pester legacy CodeLens is disabled because we'll need it in this test. PsesLanguageClient.Workspace.DidChangeConfiguration( @@ -777,7 +811,7 @@ public async Task CanSendPesterCodeLensRequest() } [Fact] - public async Task CanSendReferencesCodeLensRequest() + public async Task CanSendReferencesCodeLensRequestAsync() { string filePath = NewTestFile(@" function CanSendReferencesCodeLensRequest { @@ -815,14 +849,14 @@ function CanSendReferencesCodeLensRequest { } [SkippableFact] - public async Task CanSendCodeActionRequest() + public async Task CanSendCodeActionRequestAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode && TestsFixture.IsWindowsPowerShell, "Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load."); string filePath = NewTestFile("gci"); - await WaitForDiagnostics(); + await WaitForDiagnosticsAsync(); CommandOrCodeActionContainer commandOrCodeActions = await PsesLanguageClient @@ -872,7 +906,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendCompletionAndCompletionResolveRequest() + public async Task CanSendCompletionAndCompletionResolveRequestAsync() { string filePath = NewTestFile("Write-H"); @@ -897,7 +931,7 @@ public async Task CanSendCompletionAndCompletionResolveRequest() } [Fact] - public async Task CanSendCompletionResolveWithModulePrefixRequest() + public async Task CanSendCompletionResolveWithModulePrefixRequestAsync() { await PsesLanguageClient .SendRequest( @@ -931,7 +965,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendHoverRequest() + public async Task CanSendHoverRequestAsync() { string filePath = NewTestFile("Write-Host"); @@ -959,7 +993,7 @@ public async Task CanSendHoverRequest() } [Fact] - public async Task CanSendSignatureHelpRequest() + public async Task CanSendSignatureHelpRequestAsync() { string filePath = NewTestFile("Get-Date "); @@ -984,7 +1018,7 @@ public async Task CanSendSignatureHelpRequest() } [Fact] - public async Task CanSendDefinitionRequest() + public async Task CanSendDefinitionRequestAsync() { string scriptPath = NewTestFile(@" function CanSendDefinitionRequest { @@ -1022,7 +1056,7 @@ await PsesLanguageClient } [SkippableFact] - public async Task CanSendGetProjectTemplatesRequest() + public async Task CanSendGetProjectTemplatesRequestAsync() { Skip.If(TestsFixture.RunningInConstainedLanguageMode, "Plaster doesn't work in ConstrainedLanguage mode."); @@ -1048,7 +1082,7 @@ await PsesLanguageClient } [SkippableFact] - public async Task CanSendGetCommentHelpRequest() + public async Task CanSendGetCommentHelpRequestAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode && TestsFixture.IsWindowsPowerShell, @@ -1088,7 +1122,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendEvaluateRequest() + public async Task CanSendEvaluateRequestAsync() { EvaluateResponseBody evaluateResponseBody = await PsesLanguageClient @@ -1106,7 +1140,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendGetCommandRequest() + public async Task CanSendGetCommandRequestAsync() { List pSCommandMessages = await PsesLanguageClient @@ -1119,7 +1153,7 @@ await PsesLanguageClient } [SkippableFact] - public async Task CanSendExpandAliasRequest() + public async Task CanSendExpandAliasRequestAsync() { Skip.If( TestsFixture.RunningInConstainedLanguageMode, @@ -1139,7 +1173,7 @@ await PsesLanguageClient } [Fact] - public async Task CanSendSemanticTokenRequest() + public async Task CanSendSemanticTokenRequestAsync() { string scriptContent = "function"; string scriptPath = NewTestFile(scriptContent);