diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs index 7cf189fb984..eee5840d49b 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs @@ -603,7 +603,7 @@ private void WriteToConsole(ReadOnlySpan value, bool transcribeResult, boo private void WriteToConsole(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string text, bool newLine = false) { - // Sync access so that we don't race on color settings if called from multiple threads. + // Sync access so that we don't conflict on color settings if called from multiple threads. lock (_instanceLock) { ConsoleColor fg = RawUI.ForegroundColor; @@ -779,7 +779,7 @@ public override void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgr private void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value, bool newLine) { - // Sync access so that we don't race on color settings if called from multiple threads. + // Sync access so that we don't conflict on color settings if called from multiple threads. lock (_instanceLock) { ConsoleColor fg = RawUI.ForegroundColor; diff --git a/src/System.Management.Automation/FormatAndOutput/common/OutputManager.cs b/src/System.Management.Automation/FormatAndOutput/common/OutputManager.cs index a5bf1c9bf22..45999bdb7c3 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/OutputManager.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/OutputManager.cs @@ -213,10 +213,10 @@ private void InitializeCommandsHardWired(ExecutionContext context) additional types. Adding a handler here would cause a new sub-pipeline to be created. - For example, the following line would add a new handler named "out-foobar" - to be invoked when the incoming object type is "MyNamespace.Whatever.FooBar" + For example, the following line would add a new handler named "out-example" + to be invoked when the incoming object type is "MyNamespace.Whatever.Example" - RegisterCommandForTypes (context, "out-foobar", new string[] { "MyNamespace.Whatever.FooBar" }); + RegisterCommandForTypes (context, "out-example", new string[] { "MyNamespace.Whatever.Example" }); And the method can be like this: private void RegisterCommandForTypes (ExecutionContext context, string commandName, Type commandType, string[] types) diff --git a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs index 21fd37e27ad..24909f1c9af 100644 --- a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs @@ -1751,10 +1751,10 @@ protected override void BeginProcessing() /// c:\temp\mdir\mdir # resolve by using extensions. mdir is a directory, mdir.xxx is a file. /// c:\temp\mdir # load default module if mdir is directory /// module # $PSScriptRoot/module/module.psd1 (ps1,psm1,dll) - /// module/foobar.psm1 # $PSScriptRoot/module/module.psm1 - /// module/foobar # $PSScriptRoot/module/foobar.XXX if foobar is not a directory... - /// module/foobar # $PSScriptRoot/module/foobar is a directory and $PSScriptRoot/module/foobar/foobar.XXX exists - /// module/foobar/foobar.XXX + /// module/examplemodule.psm1 # $PSScriptRoot/module/module.psm1 + /// module/examplemodule # $PSScriptRoot/module/examplemodule.XXX if examplemodule is not a directory... + /// module/examplemodule # $PSScriptRoot/module/examplemodule is a directory and $PSScriptRoot/module/examplemodule/examplemodule.XXX exists + /// module/examplemodule/examplemodule.XXX /// protected override void ProcessRecord() { diff --git a/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs b/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs index fc69216b677..5b6098a944d 100644 --- a/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs @@ -36,7 +36,7 @@ internal void AddSessionStateEntry(SessionStateVariableEntry entry) /// /// Get a variable out of session state. This interface supports - /// the scope specifiers like "global:foobar" + /// the scope specifiers like "global:example" /// /// /// name of variable to look up @@ -67,7 +67,7 @@ internal PSVariable GetVariable(string name, CommandOrigin origin) /// /// Get a variable out of session state. This interface supports - /// the scope specifiers like "global:foobar" + /// the scope specifiers like "global:example" /// /// /// name of variable to look up @@ -86,7 +86,7 @@ internal PSVariable GetVariable(string name) /// /// Get a variable out of session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "env:PATH" or "global:foobar" + /// "env:PATH" or "global:example" /// /// /// name of variable to look up @@ -129,7 +129,7 @@ internal object GetVariableValue(string name) /// /// Get a variable out of session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "env:PATH" or "global:foobar" + /// "env:PATH" or "global:example" /// /// /// name of variable to look up @@ -595,7 +595,7 @@ internal PSVariable GetVariableItem( /// /// Get a variable out of session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "env:PATH" or "global:foobar" + /// "env:PATH" or "global:example" /// /// /// name of variable to look up @@ -646,7 +646,7 @@ internal PSVariable GetVariableAtScope(string name, string scopeID) /// /// Get a variable out of session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "env:PATH" or "global:foobar" + /// "env:PATH" or "global:example" /// /// /// name of variable to look up @@ -922,7 +922,7 @@ internal object GetAutomaticVariableValue(AutomaticVariable variable) /// /// Set a variable in session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "$env:PATH = 'c:\windows'" or "$global:foobar = 13" + /// "$env:PATH = 'c:\windows'" or "$global:example = 13" /// /// /// The name of the item to set. @@ -967,7 +967,7 @@ internal void SetVariableValue(string name, object newValue, CommandOrigin origi /// /// Set a variable in session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "$env:PATH = 'c:\windows'" or "$global:foobar = 13" + /// "$env:PATH = 'c:\windows'" or "$global:example = 13" /// /// BUGBUG: this overload exists because a lot of tests in the /// testsuite use it. Those tests should eventually be fixed and this overload @@ -1005,7 +1005,7 @@ internal void SetVariableValue(string name, object newValue) /// /// Set a variable in session state. This interface supports - /// the scope specifiers like "$global:foobar = 13" + /// the scope specifiers like "$global:example = 13" /// /// /// The variable to be set. @@ -1639,7 +1639,7 @@ internal void RemoveVariable(PSVariable variable, bool force) /// /// Remove a variable from session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "env:PATH" or "global:foobar" + /// "env:PATH" or "global:example" /// /// /// name of variable to remove @@ -1669,7 +1669,7 @@ internal void RemoveVariableAtScope(string name, string scopeID) /// /// Remove a variable from session state. This interface supports /// the "namespace:name" syntax so you can do things like - /// "env:PATH" or "global:foobar" + /// "env:PATH" or "global:example" /// /// /// name of variable to remove diff --git a/src/System.Management.Automation/engine/parser/Parser.cs b/src/System.Management.Automation/engine/parser/Parser.cs index 94b4e842956..ade1d79481d 100644 --- a/src/System.Management.Automation/engine/parser/Parser.cs +++ b/src/System.Management.Automation/engine/parser/Parser.cs @@ -4887,7 +4887,7 @@ private StatementAst UsingStatementRule(Token usingToken) { case TokenKind.EndOfInput: case TokenKind.NewLine: - // Example: 'using module ,FooBar' + // Example: 'using module ,exampleModuleName' // GetCommandArgument will successfully return an argument for a unary array argument // but we don't want to allow that syntax with a using statement. case TokenKind.Comma: diff --git a/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs b/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs index f146beb3d4a..b0f46aac710 100644 --- a/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs +++ b/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs @@ -490,7 +490,7 @@ internal bool CanByPassRaiseEvent(RemoteSessionStateMachineEventArgs arg) _state == RemoteSessionState.EstablishedAndKeyReceived || // TODO - Client session would never get into this state... to be removed _state == RemoteSessionState.EstablishedAndKeySent || _state == RemoteSessionState.Disconnecting || // There can be input data until disconnect has been completed - _state == RemoteSessionState.Disconnected) // Data can arrive while state machine is transitioning to disconnected, in a race. + _state == RemoteSessionState.Disconnected) // Data can arrive while state machine is transitioning to disconnected { return true; } diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs index 3d18ff69dc3..50094eec132 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs @@ -254,7 +254,7 @@ internal void ReportContext() PSKeyword.ManagedPlugin | PSKeyword.UseAlwaysAnalytic, creationRequestDetails.ToString(), creationRequestDetails.ToString()); - // RACE TO BE FIXED - As soon as this API is called, WinRM service will send CommandResponse back and Signal is expected anytime + // TO BE FIXED - As soon as this API is called, WinRM service will send CommandResponse back and Signal is expected anytime // If Signal comes and executes before registering the notification handle, cleanup will be messed result = WSManNativeApi.WSManPluginReportContext(creationRequestDetails.unmanagedHandle, 0, creationRequestDetails.unmanagedHandle); if (Platform.IsWindows && (WSManPluginConstants.ExitCodeSuccess == result)) diff --git a/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs b/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs index b951edf142a..ff9be675915 100644 --- a/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs +++ b/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs @@ -676,9 +676,9 @@ internal void ExecuteConnect(byte[] connectData, out byte[] connectResponseData) } // we currently dont support adjusting runspace count on a connect operation. - // there is a potential race here where in the runspace pool driver is still yet to process a queued + // there is a potential conflict here where in the runspace pool driver is still yet to process a queued // setMax or setMinrunspaces request. - // TODO: resolve this race.. probably by letting the runspace pool consume all messages before we execute this. + // TODO: resolve this.. probably by letting the runspace pool consume all messages before we execute this. if (clientRequestedRunspaceCount && (_runspacePoolDriver.RunspacePool.GetMaxRunspaces() != clientRequestedMaxRunspaces) && (_runspacePoolDriver.RunspacePool.GetMinRunspaces() != clientRequestedMinRunspaces)) diff --git a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs index cbccd082a77..a64d691db96 100644 --- a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs +++ b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs @@ -5246,7 +5246,7 @@ public override DynamicMetaObject FallbackGetMember(DynamicMetaObject target, Dy if (adapterData.member.DeclaringType.IsGenericTypeDefinition || adapterData.propertyType.IsByRefLike) { - // This is kinda lame - we really should throw an error, but accessing property getter + // We really should throw an error, but accessing property getter // doesn't throw error in PowerShell since V2, even in strict mode. expr = ExpressionCache.NullConstant; } diff --git a/test/powershell/Language/Parser/Parser.Tests.ps1 b/test/powershell/Language/Parser/Parser.Tests.ps1 index 5105f9e9e03..3a87c66e106 100644 --- a/test/powershell/Language/Parser/Parser.Tests.ps1 +++ b/test/powershell/Language/Parser/Parser.Tests.ps1 @@ -293,8 +293,8 @@ foo``u{2195}abc } It "Test that escaping any character with no special meaning just returns that char. (line 602)" { - $result = ExecuteCommand '"fo`obar"' - $result | Should -BeExactly "foobar" + $result = ExecuteCommand '"fo`odbar"' + $result | Should -BeExactly "foodbar" } Context "Test that we support all of the C# escape sequences. We use the ` instead of \. (line 613)" { diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1 index c2a96664f43..90df93ecee4 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1 @@ -214,16 +214,16 @@ Describe "Get-ChildItem" -Tags "CI" { It 'can handle mixed case in Env variables' { try { - $env:__FOOBAR = 'foo' - $env:__foobar = 'bar' + $env:__FOODBAR = 'food' + $env:__foodbar = 'bar' - $foobar = Get-Childitem env: | Where-Object {$_.Name -eq '__foobar'} + $foodbar = Get-Childitem env: | Where-Object {$_.Name -eq '__foodbar'} $count = if ($IsWindows) { 1 } else { 2 } - ($foobar | Measure-Object).Count | Should -Be $count + ($foodbar | Measure-Object).Count | Should -Be $count } catch { - Get-ChildItem env: | Where-Object {$_.Name -eq '__foobar'} | Remove-Item -ErrorAction SilentlyContinue + Get-ChildItem env: | Where-Object {$_.Name -eq '__foodbar'} | Remove-Item -ErrorAction SilentlyContinue } } } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 index 147dbb3098b..06c1438db55 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Alias.Tests.ps1 @@ -50,7 +50,7 @@ Describe "Export-Alias DRT Unit Tests" -Tags "CI" { } It "Export-Alias with Invalid Scope will throw PSArgumentException" { - { Export-Alias $fulltestpath -scope foobar } | Should -Throw -ErrorId "Argument,Microsoft.PowerShell.Commands.ExportAliasCommand" + { Export-Alias $fulltestpath -scope foodbar } | Should -Throw -ErrorId "Argument,Microsoft.PowerShell.Commands.ExportAliasCommand" } It "Export-Alias for Default"{ diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 index 809182caa8e..c3eb57f472a 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Format-Table.Tests.ps1 @@ -134,8 +134,8 @@ Describe "Format-Table" -Tags "CI" { @{ testName = "array" ; testString = "line1","line2" } ) { param ($testString) - $result = $testString | Format-Table -Property "foo","bar" -Force | Out-String - $result.Replace(" ","").Replace([Environment]::NewLine,"") | Should -BeExactly "foobar------" + $result = $testString | Format-Table -Property "fox","bar" -Force | Out-String + $result.Replace(" ","").Replace([Environment]::NewLine,"") | Should -BeExactly "foxbar------" } It "Format-Table with complex object for End-To-End should work" { diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 index 74c6b4175f5..ae40b64e32a 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 @@ -75,9 +75,9 @@ Describe "Get-Command Feature tests" -Tag Feature { $manifestPath = Join-Path $testdrive "test.psd1" $modulePath = Join-Path $testdrive "test.psm1" - New-ModuleManifest -Path $manifestPath -FunctionsToExport "Get-FooBar","Get-FB" -RootModule test.psm1 + New-ModuleManifest -Path $manifestPath -FunctionsToExport "Get-FoodBar","Get-FB" -RootModule test.psm1 @" - function Get-FooBar { "foobar" } + function Get-FoodBar { "foodbar" } function Get-FB { "fb" } "@ > $modulePath @@ -85,8 +85,8 @@ Describe "Get-Command Feature tests" -Tag Feature { Import-Module $manifestPath $results = Get-Command g-fb -UseAbbreviationExpansion $results | Should -HaveCount 2 - $results[0].Name | Should -BeIn "Get-FB","Get-FooBar" - $results[1].Name | Should -BeIn "Get-FB","Get-FooBar" + $results[0].Name | Should -BeIn "Get-FB","Get-FoodBar" + $results[1].Name | Should -BeIn "Get-FB","Get-FoodBar" $results[0].Name | Should -Not -Be $results[1].Name } finally { diff --git a/test/powershell/Modules/PSDesiredStateConfiguration/PSDesiredStateConfiguration.Tests.ps1 b/test/powershell/Modules/PSDesiredStateConfiguration/PSDesiredStateConfiguration.Tests.ps1 index fd51ff77012..a2b772e0a8a 100644 --- a/test/powershell/Modules/PSDesiredStateConfiguration/PSDesiredStateConfiguration.Tests.ps1 +++ b/test/powershell/Modules/PSDesiredStateConfiguration/PSDesiredStateConfiguration.Tests.ps1 @@ -486,7 +486,7 @@ Describe "Test PSDesiredStateConfiguration" -tags CI { } try { - Invoke-DscResource -Name xWebSite -ModuleName 'xWebAdministration' -Method Test -Property @{TestScript = 'foobar' } -ErrorAction Stop -WarningVariable warnings + Invoke-DscResource -Name xWebSite -ModuleName 'xWebAdministration' -Method Test -Property @{TestScript = 'foodbar' } -ErrorAction Stop -WarningVariable warnings } catch{ #this will fail too, but that is nat what we are testing... diff --git a/test/powershell/engine/Help/HelpSystem.Tests.ps1 b/test/powershell/engine/Help/HelpSystem.Tests.ps1 index 03ed622ddba..14c54a14852 100644 --- a/test/powershell/engine/Help/HelpSystem.Tests.ps1 +++ b/test/powershell/engine/Help/HelpSystem.Tests.ps1 @@ -574,7 +574,7 @@ Describe "Help failure cases" -Tags Feature { ) { param($command) - { & $command foobar -ErrorAction Stop } | Should -Throw -ErrorId "HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand" + { & $command DoesNotExist -ErrorAction Stop } | Should -Throw -ErrorId "HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand" } }