Skip to content

Commit fbf2905

Browse files
committed
Merge branch 'sdw-w406969-pssa-124' into 24.0-docsbackport
2 parents 9e546e4 + b166135 commit fbf2905

5 files changed

+11
-20
lines changed

docs/Rules/AvoidDefaultValueSwitchParameter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ function Test-Script
7474
- [Strongly Encouraged Development Guidelines][01]
7575

7676
<!-- link references -->
77-
[01]: /powershell/scripting/developer/cmdlet/strongly-encouraged-development-guidelines#parameters-that-take-true-and-false
77+
[01]: https://learn.microsoft.com/powershell/scripting/developer/cmdlet/strongly-encouraged-development-guidelines#parameters-that-take-true-and-false

docs/Rules/AvoidUsingConvertToSecureStringWithPlainText.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Avoid Using SecureString With Plain Text
3-
ms.date: 06/28/2023
3+
ms.date: 01/28/2025
44
ms.topic: reference
55
title: AvoidUsingConvertToSecureStringWithPlainText
66
---

docs/Rules/UseCorrectCasing.md

+6-15
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,26 @@ title: UseCorrectCasing
1010

1111
## Description
1212

13-
This is a style/formatting rule. PowerShell is case insensitive wherever possible,
14-
so the casing of cmdlet names, parameters, keywords and operators does not matter.
15-
This rule nonetheless ensures consistent casing for clarity and readability.
16-
Using lowercase keywords helps distinguish them from commands.
17-
Using lowercase operators helps distinguish them from parameters.
13+
This is a style formatting rule. PowerShell is case insensitive where applicable. The casing of
14+
cmdlet names or parameters does not matter but this rule ensures that the casing matches for
15+
consistency and also because most cmdlets/parameters start with an upper case and using that
16+
improves readability to the human eye.
1817

1918
## How
2019

21-
Use exact casing for type names.
22-
2320
Use exact casing of the cmdlet and its parameters, e.g.
2421
`Invoke-Command { 'foo' } -RunAsAdministrator`.
2522

26-
Use lowercase for language keywords and operators.
27-
2823
## Example
2924

3025
### Wrong
3126

3227
```powershell
33-
ForEach ($file IN get-childitem -recurse) {
34-
$file.Extension -Eq '.txt'
35-
}
28+
invoke-command { 'foo' } -runasadministrator
3629
```
3730

3831
### Correct
3932

4033
```powershell
41-
foreach ($file in Get-ChildItem -Recurse) {
42-
$file.Extension -eq '.txt'
43-
}
34+
Invoke-Command { 'foo' } -RunAsAdministrator
4435
```

docs/Rules/UseShouldProcessForStateChangingFunctions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ function Set-ServiceObject
7474
<!-- link references -->
7575
[01]: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_cmdletbindingattribute
7676
[02]: https://learn.microsoft.com/powershell/scripting/developer/cmdlet/requesting-confirmation-from-cmdlets
77-
[03]: https://learn.microsoft.com/powershell/scripting/developer/cmdlet/required-development-guidelines
77+
[03]: https://learn.microsoft.com/powershell/scripting/developer/cmdlet/required-development-guidelines#support-confirmation-requests-rd04
7878
[04]: https://learn.microsoft.com/powershell/scripting/learn/deep-dives/everything-about-shouldprocess

docs/Rules/UseUTF8EncodingForHelpFile.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ save files with a specific encoding.
2828
For more information, see the following articles:
2929

3030
- [System.IO.StreamReader](xref:System.IO.StreamReader.CurrentEncoding%2A)
31-
- [about_Character_Encoding](/powershell/module/microsoft.powershell.core/about/about_character_encoding)
31+
- [about_Character_Encoding](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_character_encoding)
3232
- [Set-Content](xref:Microsoft.PowerShell.Management.Set-Content)
33-
- [Understanding file encoding in VS Code and PowerShell](/powershell/scripting/dev-cross-plat/vscode/understanding-file-encoding)
33+
- [Understanding file encoding in VS Code and PowerShell](https://learn.microsoft.com/powershell/scripting/dev-cross-plat/vscode/understanding-file-encoding)

0 commit comments

Comments
 (0)