Update developing_modules_general_windows.rst (#62796)

Use American spelling of favor.
pull/62806/head
akcozine 5 years ago committed by Alicia Cozine
parent 28d30a04aa
commit 09ac8c154a

@ -178,7 +178,7 @@ When creating a new module there are a few things to keep in mind:
- C# and PowerShell module utils achieve the same goal but C# allows a developer to implement low level tasks, such as calling the Win32 API, and can be faster in some cases - C# and PowerShell module utils achieve the same goal but C# allows a developer to implement low level tasks, such as calling the Win32 API, and can be faster in some cases
- Ensure the code runs under Powershell v3 and higher on Windows Server 2008 and higher; if higher minimum Powershell or OS versions are required, ensure the documentation reflects this clearly - Ensure the code runs under Powershell v3 and higher on Windows Server 2008 and higher; if higher minimum Powershell or OS versions are required, ensure the documentation reflects this clearly
- Ansible runs modules under strictmode version 2.0. Be sure to test with that enabled by putting ``Set-StrictMode -Version 2.0`` at the top of your dev script - Ansible runs modules under strictmode version 2.0. Be sure to test with that enabled by putting ``Set-StrictMode -Version 2.0`` at the top of your dev script
- Favour native Powershell cmdlets over executable calls if possible - Favor native Powershell cmdlets over executable calls if possible
- Use the full cmdlet name instead of aliases, e.g. ``Remove-Item`` over ``rm`` - Use the full cmdlet name instead of aliases, e.g. ``Remove-Item`` over ``rm``
- Use named parameters with cmdlets, e.g. ``Remove-Item -Path C:\temp`` over ``Remove-Item C:\temp`` - Use named parameters with cmdlets, e.g. ``Remove-Item -Path C:\temp`` over ``Remove-Item C:\temp``
@ -255,7 +255,7 @@ When in doubt, look at some of the other core modules and see how things have be
implemented there. implemented there.
Sometimes there are multiple ways that Windows offers to complete a task; this Sometimes there are multiple ways that Windows offers to complete a task; this
is the order to favour when writing modules: is the order to favor when writing modules:
- Native Powershell cmdlets like ``Remove-Item -Path C:\temp -Recurse`` - Native Powershell cmdlets like ``Remove-Item -Path C:\temp -Recurse``
- .NET classes like ``[System.IO.Path]::GetRandomFileName()`` - .NET classes like ``[System.IO.Path]::GetRandomFileName()``

Loading…
Cancel
Save